Acrobat 8 Text Shifting

Apr 2, 2007 12:00:00 AM | Acrobat Acrobat 8 Text Shifting

Explanation of Acrobat 8 text shifting problem: a drawing error caused by passing a large negative character spacing in a text array when text is of 0 length.

by Mark Gavin

Following is a collection of screen shots taken using a single PDF file displayed under Acrobat 4 through Acrobat 8.

Acrobat 4

Acrobat_4

Acrobat 5

Acrobat_5

Acrobat 6

Acrobat_6

Acrobat 7

Acrobat_7

Acrobat 8

Acrobat_8

Following is a PDF file which demonstrates the text shifting problem:

Acrobat 8 Text Shift.pdf

This particular drawing error is caused by passing a large negative character spacing in a text array when the text is of zero length.

132.96 741.6 TD -0.06048 Tc [()-4800()] TJ -0.32976 Tc (A) Tj

Since Adobe has never documented proper coding constructs; the above has become a common technique used by some third party developers to move to the beginning of a line.

The PDF Reference states “Strings presented to the text-showing operators may be any length…”.  Since the PDF Reference does not state that text can not be zero length; the above PDF construct is correct.  Unfortunately, it looks like someone in the Acrobat 8 engineering team “didn’t get the memo”.

My original title for this entry was “When is a validation tool, not a validation tool?”  But that looked a bit too long and the reference a bit obscure.

PDF does not have a concept of “Well Formed and Valid” like XML.  In addition, Adobe has never created a PDF validation tool to help PDF developers determine if the PDF they produce is correct.  By default; Adobe Reader is used by developers as a PDF validation tool.  Unfortunately, Adobe Reader is not, and never was intended to be, a validation tool.

With glaring errors like this in Acrobat 8; the whole concept of PDF as “digital paper” begins to unravel.

 

Mark Gavin

Written By: Mark Gavin

Appligent Chief Technology Officer and software architect. Mark invented PDF redaction in 1997 and is also the creator of several other first-ever PDF applications, including Appligent’s SecurSign and FDFMerge, EMC’s Documentum IRM for PDF, and Liquent’s CoreDossier.