This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception in reading PDF using java

 
karmegam shiva
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
karmegam shiva
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18218
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
karmegam shiva
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18218
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You won't. You have to create it yourself. Put a SET JAVA_OPTS="-Xmx=256m" or something like that in it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic