Printing a PDF results in garbled text (sometimes)

We have a system that renders a report as a PDF, and displays it in the browser for the user. In the browser, the document always appears to display fine, but when printed on one machine, it sometimes changes some of the data in the report to seemingly random characters.

Here are some examples of the strings it inserts:

Ebuf;
Bvhvt ul1: -!3122
Ti jqqf e!Wjb;
Nfttf ohf s!Tf swjdf

Additionally, the inter-character spacing is weird. It sometimes writes characters overlapping each other.

I noticed some repetition in the garbled text, so I typed a few of them into Google, and surprisingly got a lot of hits. Here is the string I searched for: pdf cjmp ebuf nftf up!

The Google search summaries contain the garbled text. However, when I click on those links in Google, I get perfectly readable PDF files. It's as if Google's PDF crawler has the same bug.

Has anyone figured this out? Is this an Acrobat Reader bug?


Solution 1:

I noticed that there were lots of good suggestions for how to fix this printing issue, but I thought it might be interesting and useful to post an explanation of the underlying cause.

It appears that these PDF misprints are due to a character encoding problem. All the ASCII characters are showing up as 1 higher than they should be (see ASCII character table here).

For example, the letter "D" is showing up as "E", and the letter "b" is showing up as "a". White "space" shows up as "!", and ":" shows up as ";". *Note that whitespace in the garbled PDF doesn't mean anything. "space" shows up as "!".

Here is the example string from the original post:

Ebuf;
Bvhvt ul1: -!3122
Ti jqqf e!Wjb;
Nfttf ohf s!Tf swjdf

Correcting for the "+1" encoding error, we get:

Date:
Augustk09, 2011 
Shipped Via:
Messenger Service

I suspect that the l on line 2 of the example was probably a !, which would be a "space" such that the correct message would read:

Date:
August 09, 2011 
Shipped Via:
Messenger Service

Solution 2:

One fix which overcomes lots of Acrobat printing problems is to "Print as Image". As shown in the link, you can select that at print time, under the "advanced" button. Unfortunately it can also mean that the print jobs become significantly larger (this is printer and job dependent).

Another thing you can do is to try a different PDF reader (e.g. Foxit or CutePDF) but organisational readers may make this impossible.