[NTG-pdftex] problem of acrobat reader 4.0 or pdftex?

Thanh Han The hanthethanh at gmail.com
Fri Feb 9 00:30:04 CET 2007


maybe it's related to this (copied from pdftex sources in older versions):

,--------
| @!pdf_first_space_corr: integer; {amount of first word spacing while
drawing a string;
| for some reason it is not taken into account of the length of the
string, so we
| have to save it in order to adjust spacing when string drawing is finished}
`--------

I have verified this as follows: uncompressed microtype.pdf, used a text editor
to find where the line

3.1 Micro-Typographic Options . . . . . . . . . . . . . . . . . . . . . . 6

is drawn. It looks as follows:

,--------
| /F95 9.9626 Tf 14.944 -13.993 Td
[(3.1)-910(Micro-)37(T)93(ypographic)-278(Options)]TJ
| 0 g 0 G
|  [-970(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-
   500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)-500(.)]TJ
| 0 g 0 G
|  [-1740(6)]TJ
`--------

According to the above note, the first space is not taken into account of the
string length, so I tried to add it (ie -970) to the space after the current TJ
operator (ie to -1740 in the following TJ, so now it became -2710). After this
the digit 6 ended up aligned as expected (but now it looks bad in xpdf).


Thanh

On Thu, Feb 08, 2007 at 11:16:02PM +0100, Hartmut Henkel wrote:
> On Thu, 8 Feb 2007, w.m.l at gmx.net wrote:
>
> > On 07.02.2007 10:45, Thanh Han The wrote:
> > > while viewing the microtype manual (from texlive2007) using
> > > acr4.0 on linux, I found some oddities as shown here:
> >
> > Same under Windows, Acrobat Reader 4.05. Additionally, the page numbers
> > on the right-hand side in the TOC are completely mis-aligned.
> >
> > It appears fine when created with (miktex's) pdftex 1.30.
>
> this still uses \pdfliteral {} without "direct", so you find (lengthy)
> coordinate transforms like this around color change commands in the PDF:
>
> 1 0 0 1 498.65 487.517 cm
> 0 g 0 G
> 1 0 0 1 -338.982 -13.027 cm
> 0.02 0.04 0.48 rg 0.02 0.04 0.48 RG
> 1 0 0 1 -159.668 -474.49 cm
>
> With pdftex-1.40 now hyperref seems to use the more compact \pdfliteral
> direct {} version.
>
> > With 1.40, it looks OK if I set hyperref's colorlinks option to false
> > (ie., have the links surrounded by boxes instead of coloured).
>
> then the color change commands between the []TJ sections go away. It
> appears that acro4.0 doesn't like legal PDF like this:
>
> 0 g 0 G
> /F51 8.9664 Tf 22.908 -11.955 Td [([)]TJ
> 0.02 0.04 0.48 rg 0.02 0.04 0.48 RG
>  [(Protrusion)]TJ
> 0 g 0 G
>  [-343(\025)-342(49])-370([)]TJ
> 0.02 0.04 0.48 rg 0.02 0.04 0.48 RG  % <--- acro4.0 bug with these lines
>  [(Expansion)]TJ
> 0 g 0 G
>  [-343(\025)-342(56])-371([)]TJ
> 0.02 0.04 0.48 rg 0.02 0.04 0.48 RG
>  [(In)29(terw)28(ord)-342(Spacing)-343(\050Glue\051)]TJ
>
> Regards, Hartmut
> _______________________________________________
> ntg-pdftex mailing list
> ntg-pdftex at ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-pdftex


More information about the ntg-pdftex mailing list