View previous topic :: View next topic
|
Author |
Message |
prabu.sivaram
New User
Joined: 21 Feb 2011 Posts: 8 Location: Chennai
|
|
|
|
Hello Folks,
I am trying to find a way to send a mail to other user with file attachment as PDF.
Initially i decoded the PS file from EBCDIC to ASCII format and tried to send the same to user with IEBGENER utility.
Following is the Encoding used for PDF attachment.
CONTENT-TYPE: application/pdf; NAME="Batch_Stat.pdf"
CONTENT-TRANSFER-ENCODING: BINARY
CONTENT-DISPOSITION: ATTACHMENT
Finally i got the mail with file attachment as PDF..But if i open the file in adobe reader it is throwing a error as
"Adobe Couldn't open 'Batch_Stat.pdf' because it is not the supported file type or file damaged"
Please help me if i need to do anything before sending as attachment. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Merely specifying the attachment type as PDF does NOT make the text into a PDF file. Unless you have software on your mainframe that converts text files to PDF files, what you want to do cannot be done. You could read the 756-page specification for PDF files and write a program to run on your mainframe to convert a text file to a PDF, or you could convince your management to buy software from a vendor to do this, or you could realize that you cannot send a PDF file from the mainframe. One of these three WILL happen. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Simply calling some data .PDF does not convert the data to a PDF - neither in EBCDIC nor ASCII.
If you want a file to be in PDF format, you must pass the data thru some process that does the conversion - then transmit that converted file (as a BINARY file). |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hello,
How is the PDF file generated on mainframe? If the file is just a flat file(PS file) with TEXT in it, then you cannot send it as pdf
You would need a software which generates actual PDF file on mainframe(like SAS) and then you could send it across using the SMTP statements you have shown above.
If you open a .pdf file or .xls file using notepad you can find a lot of fuzzy data in it, this means that the are data crafted in specific format and not plain text.
Edit: Did not see top 2 posts when posting |
|
Back to top |
|
|
parsesource
New User
Joined: 06 Feb 2006 Posts: 97
|
|
|
|
The xmitip mail package also includes pdf support (using a free txt2pdf converter)
google for it - easy to find |
|
Back to top |
|
|
prabu.sivaram
New User
Joined: 21 Feb 2011 Posts: 8 Location: Chennai
|
|
|
|
Hi All,
Thanks for your support. I will look for ways to convert it into PDF format.
Will post you my findings once completed.. |
|
Back to top |
|
|
|