*
The moose likes Other Open Source Projects and the fly likes Unable to view a PDF content generated through Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Unable to view a PDF content generated through" Watch "Unable to view a PDF content generated through" New topic
Author

Unable to view a PDF content generated through

satyanath puppala
Greenhorn

Joined: May 13, 2013
Posts: 5
Hi All,

We are generating a PDF through java program(using itext) which will run in VMS System for few PDF's we are unable to see the content even though it shows some size on disk.

We are sending the PDF's thorugh mail using MAIL API.Then when we download the attcahment and see there are pages but unable to see the content please help me on this.

PFA sample PDF.

Java mail code looks like this

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41180
    
  45
Is it a proper PDF file, meaning - does it display correctly when viewed directly, without first being sent by mail? If you haven't tried that, that's where you should start.


Ping & DNS - my free Android networking tools app
satyanath puppala
Greenhorn

Joined: May 13, 2013
Posts: 5
Hi Ulf Dittmer,

Thanks for replying as i mentioned in the post it's generated in VMS System so we are not able to see PDF's there once it's mailed only we can see that .

So we cannot verify there..

Thanks & Regards,
Satyanath
satyanath puppala
Greenhorn

Joined: May 13, 2013
Posts: 5
Also once mail has sent the PDF will be deleted by the code in production.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41180
    
  45
Then I advise to get in touch with the sys admins of that system - most likely they can grab one of the troublesome PDFs before they're deleted.

One thing I notice is that it says that the charset is US-ASCII - PDFs are binary files that contain characters outside of the ASCII range.
satyanath puppala
Greenhorn

Joined: May 13, 2013
Posts: 5
Then can i set it as


Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41180
    
  45
PDFs are definitely not ASCII, UTF-8 might work.
satyanath puppala
Greenhorn

Joined: May 13, 2013
Posts: 5
Thanks & Sorry for disturbing you




is it correct or shall i need to use like this?



 
Don't get me started about those stupid light bulbs.
 
subject: Unable to view a PDF content generated through
 
Similar Threads
problem with java mail attachment
File attachments using Java Mail API
How to attach a TextFile as a File?
SetSubType usage?
Problem attaching a File