aspose file tools*
The moose likes Servlets and the fly likes servlet not displaying all the pages in PDF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet not displaying all the pages in PDF" Watch "servlet not displaying all the pages in PDF" New topic
Author

servlet not displaying all the pages in PDF

prav ba
Greenhorn

Joined: Jun 17, 2007
Posts: 12
hi all,
have a very interesting problem. i have a servlet which is meant to download a PDF doco stored in an oracle database as a BLOB and display it in the users browser. The PDF is 900 pages long but in the browser it only displays 200 pages. Have tried it IE v 7 and FireFox v 3.6.8 what could be causing this ??

servlet code sniplet :




thanks in advance.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18987
    
    8

Have you confirmed that "cacheImpl.getPDF(ID)" actually returns the entire PDF document? 900 pages of PDF sounds like a lot of bytes to me, if I were writing the code I wouldn't load the entire document into memory. I would stream it from... wherever it's coming from... to the servlet's output stream. You may be running out of memory.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: servlet not displaying all the pages in PDF