Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17



Posted on 2013-12-16
Medium Priority
Last Modified: 2013-12-17
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

Question by:gskortz
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
LVL 55

Expert Comment

by:Joe Winograd, EE MVE 2015&2016
ID: 39721984
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

Author Comment

ID: 39722613
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.
LVL 55

Expert Comment

by:Joe Winograd, EE MVE 2015&2016
ID: 39722638
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?

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.


Author Comment

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


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.
LVL 55

Accepted Solution

Joe Winograd, EE MVE 2015&2016 earned 1000 total points
ID: 39724916
Interesting that IBM recommends Alpine or Mutt. Here's a site with some other recommendations (one of them is Mutt):

I've had no experience with these, so can't offer any guidance, but it's certainly worthwhile for you to experiment with them. Regards, Joe

Author Comment

ID: 39724935
Thanks for the link I had previously looked at this site. I am going to experiment with mutt and see what happens.

Author Comment

ID: 39724988
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.
LVL 55

Expert Comment

by:Joe Winograd, EE MVE 2015&2016
ID: 39724961
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

Author Closing Comment

ID: 39724989
Appreciate the effort but really just suggest not a solution.

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Suggested Courses

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question