aspose file tools*
The moose likes Other Open Source Projects and the fly likes PDF Files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "PDF Files" Watch "PDF Files" New topic
Author

PDF Files

colin shuker
Ranch Hand

Joined: Apr 11, 2005
Posts: 744
Hi, I'm using the iText-2.1.5.jar to create pdf files.

So far I am able to create a pdf file in java and save it to a location.
I would like to be able to create a pdf file in java, then just open it, without saving to any location.

Can anyone help me? Thanks
Allain Walker
Greenhorn

Joined: May 24, 2005
Posts: 14
Hi Colin,
I have only used iText a couple of times but I am pretty sure that one has to save the file to view it, I am happy to be corrected if I am wrong. I used it when generating report files and receipts, so we had to store them anyhoo, but I seem to remember it has to be stored to be viewed.
On saying that though, I have just found this link, it shows PDF being generated to a HTTP request, webpage , but it is still writing the document to an OutputStream, so I don't really think this will help.


5 years on and still a Greenhorn, what to do, what to do?
colin shuker
Ranch Hand

Joined: Apr 11, 2005
Posts: 744
Thanks, I already looked at that page.

What I've done is...
Save file in the projects root, then open with:

I gather that this code will only work with windows, and it does not rely on the iText.jar package.
I was wondering if there was any code in that package that will open a pdf file instead of the code above.

Thanks
Allain Walker
Greenhorn

Joined: May 24, 2005
Posts: 14
It is good that I can still learn new stuff every day, thanks for showing me that.
As for just opening it, you would need to have the reader implemented in a jar file, which I don't think happens in iText.
I have just done a quick Google and found this JPedal, is this the kind of thing you are looking for?
colin shuker
Ranch Hand

Joined: Apr 11, 2005
Posts: 744
Thanks, that seems expensive and a bit complicated for my needs.
Perhaps the demo is worth downloading
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42635
    
  65
Thanks, that seems expensive and a bit complicated for my needs.

The LGPL version includes the viewer, albeit with a reduced feature set (for example, no printing).


Ping & DNS - my free Android networking tools app
 
Consider Paul's rocket mass heater.
 
subject: PDF Files