It's not a secret anymore!*
The moose likes JSF and the fly likes Exception in reading PDF using java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Exception in reading PDF using java" Watch "Exception in reading PDF using java" New topic
Author

Exception in reading PDF using java

karmegam shiva
Greenhorn

Joined: Feb 18, 2013
Posts: 7
0 down vote favorite


i have a problem with reading PDF file content in java using itextpdf.jar ,

if i read a small sized(5-15MB) PDF file means its working well, it is possible to read it's contents

but when i read large sized(200MB) PDF file means its showing Run time exception like following




Any possible answer for this, i am using Tomcat 7, windows xp
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41068
    
  43
How much memory does the Tomcat have assigned? I would imagine that the in-memory representation of a PDF is several times its file size.


Ping & DNS - my free Android networking tools app
karmegam shiva
Greenhorn

Joined: Feb 18, 2013
Posts: 7
i am using windows XP so default size of heap memory is 64 MB, how can i increase the heap memory size for tomcat.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15951
    
  19

karmegam shiva wrote:i am using windows XP so default size of heap memory is 64 MB, how can i increase the heap memory size for tomcat.


You increase Tomcat's JVM memory allowance using the -Xmx JVM parameter. You can set the JAVA_OPTS environment variable in a script named TOMCAT_HOME\bin\setenv.bat that you create and place the parameter there.

For more info, ask in the Tomcat forum.


Customer surveys are for companies who didn't pay proper attention to begin with.
karmegam shiva
Greenhorn

Joined: Feb 18, 2013
Posts: 7
Tim Holloway wrote:You can set the JAVA_OPTS environment variable in a script named TOMCAT_HOME\bin\setenv.bat .


Thanks for your points Tim, but actually i am using it in windows XP , i didn't see setenv.bat any where including \bin .
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15951
    
  19

You won't. You have to create it yourself. Put a SET JAVA_OPTS="-Xmx=256m" or something like that in it.
 
Consider Paul's rocket mass heater.
 
subject: Exception in reading PDF using java
 
Similar Threads
configuring Quartz scheduler in tomcat 6 using JNDI
Searching PDF file taking Longer time
StrutsTestCase Exception - Not reading few <init-param> parameters in web.xml
load PDF file from website
web.xml causes 404 error