• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Regarding the IText API

 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Everybody,

I tried to merge two pdf documents using itext api. it's working fine for small size of documents. i tried to merge a 40MB document with 30KB document, it shows the out of memory exception. i increased the heap size of java also.. still i am getting the same error.

1. What is the limitation of file size while merging using itext api. i want to confirm is there any limitiations in itext api

2. Please provide me the sample source or guide me how to merge the 40MB document with 30Kb document.

i am awaiting for your earlier response....

--
With Regards,
M. Bharathi
 
author & internet detective
Posts: 42074
933
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How much memory did you increase it to?
 
muthu bharathi
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jeanne

Thanks a lot for your valuable response


First i tried to merge 38MB pdf files with 30KB pdf files. i got the out of memory exception.

1. I need upto 100 MB pdf files this is my scenario.

Please let me know if we have any other possibilities to merge the large size of pdf files...


--
Thanks & Regards,
M. Bharathi
 
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you running out of regular heapspace or the permgen space? Have you tried profile the memory usage with the visualjvm tool?
 
muthu bharathi
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jeanne,

Thanks for your response.

we have 4GB RAM machine and we set the java heap space is 1024. still we are getting the same exception. we cannot merge the two large size of pdf documents. I need some more clarifications:

1. how much of java heap space memory(maximum limit of JVM heap space) if i have a 4GB RAM machine.

2. Is there any calculations/limitations to set the heap size based on the RAM memory.

3. We set the java heap space through Environmental variables. please confirm me it is correct or not and i used the following line to set the heap space JAVA_OPTS=-Xms1024.

Please clarify the above as soon as possible

--
Regards,
Bharathi


 
Martijn Verburg
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1.) It depends on the Operating System and the underlying architecture (32 or 64 bit) you'll need to do some research for your combination

2.) Not easily that I'm aware of, you could write a script to detect your machine's RAM and adjust accordingly before you fire the Java process I suppose.

3.) That's minimum memory and it needs to be -Xms1024M you also might want to give it a max -Xmx2048M for example, as long as your java command is picking up the JAVA_OPTS that should work fine
 
We can fix it! We just need some baling wire, some WD-40, a bit of duct tape and this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic