Link to home
Start Free TrialLog in
Avatar of gskortz
gskortzFlag for United States of America

asked on

GHOSTSCRIPT A2PS PDF FILES NOT READABLE ON MOBILE DEVICES

We have used ghostscript (ps2pdf) and a2ps on both AIX and RH platforms for sometime and the resulting output works as expected on all desktop OS and clients, Windows, MAC and with various email clients, however, the same emails with PDF attachments cannot be viewed on mobile devices, iPad, iPhone, Android regardless of the email client. This is true even if the attachment is saved to the device and other office type, Adobe mobile applications are used to open it.

Generally, the error is The document cannot be opened because it is not a valid PDF document. Sometimes the document opens but no text is rendered.  In the process of trouble shooting we have discovered that the very same email attachments will open when forwarded from a desktop email client (i.e. Outlook) to an account and then accessed with mobile device.  This leads me to believe that the issue is with the original email attachment rather than the the actual file.

The file and transmission process is
1) Create a ASCII text report file on UNIX/LINUX server
2) Convert the file to PS with a2ps, text file with the a2ps options attached.
3) Convert the PS output to PDF (ghostscript ps2pdf)
4) uuencode the PDF file
5) Create the email with mail

Thanks
GSK
a2ps-ps2pdf-information.txt
Avatar of Joe Winograd
Joe Winograd
Flag of United States of America image

Hi GSK,
This is a total hip-shot, but maybe the email clients on the mobile devices don't support the uuencoded file. You may want to try different encoding, perhaps MIME, which is ubiquitous these days and likely to be supported on the mobile email clients. But, again, this is just a guess...can't hurt to give it a try, though. Regards, Joe
Avatar of gskortz

ASKER

Joe, thanks for the response. I tested using the AIX MIME encode (uuencode -m) and the results are different but not good. Instead of appears as an attachment to the file when using the uuencode -m option the BASE64 encoded text appears in the body of the email.

Since the the files are readable once forwarded from an email client, Outlook for example, I think this really is an Unix/Linux mail/sendmail issue specific lower level issue with "how" the attachments appear.
But if it's a Unix/Linux mail/sendmail issue, why can all desktop operating systems with various email clients open them fine? You say it's only mobile operating systems (with any and all email clients) that can't open them – right?
Avatar of gskortz

ASKER

The issue is the how the attachment is being handled by sendmail. Below is response from AIX technical support indicating not our problem.

IBM---response:

The mail program on your mobile device is not extracting the uuencoded attachment from the mail body which contains the encoding related lines added by AIX sendmail. This is either a defect or a restriction in the mobile mail program you are using.

- AIX sendmail does not provide a different facility to send attachments. If you need more functionality you need to check for other mail programs to compose and send the mail.

- The mail command was not designed to handle the MIME encoded data to make it appear as an attachment to the mail client that is receiving it.

- In other words, the default mail command that ships with AIX is not capable of sending MIME encoded attachments. Therefore, you would need to download a 3rd party application, such as Alpine or Mutt. These are not supported IBM applications, but they should work.

Please let me know if you have any other questions.

Thank you for letting me know if you shall need further assistance on this service request or if I can go ahead and close it.
ASKER CERTIFIED SOLUTION
Avatar of Joe Winograd
Joe Winograd
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gskortz

ASKER

Thanks for the link I had previously looked at this site. I am going to experiment with mutt and see what happens.
GSK
Avatar of gskortz

ASKER

I've requested that this question be closed as follows:

Accepted answer: 0 points for gskortz's comment #a39724935

for the following reason:

Appreciated the thought but not really a solution.
You're welcome. Happy to try to help. Good luck with your experimentation. I hope you find that one of the encoding techniques works. Regards, Joe
Avatar of gskortz

ASKER

Appreciate the effort but really just suggest not a solution.