Preview: Table of Contents is ignoring formatting
Preview is missing a feature. Before going further I’ll admit it is a minor feature, but nonetheless, the omission needles me. The bug description below is deliberately thorough, to allow other to reproduce the problem and variations of it.
PDFs exhibiting the problem have been made with the following 18 lines of PostScript.
%!
/PageWidth 72 def /PageHeight 432 def
<< /PageSize [PageWidth PageHeight] >> setpagedevice
/FontNames [ /Times-Roman /Times-Italic /Times-Bold /Times-BoldItalic ] def
0 setgray
0 1 3
{
/i exch def /FontName FontNames i get def /FontNameText FontName 32 string cvs def
matrix currentmatrix PageWidth 0 translate 90 rotate
FontName 54 selectfont 18 18 moveto FontNameText show setmatrix
mark /Dest FontName /View [/Fit] /DEST pdfmark
mark /Action /GoTo /Dest FontName /Title FontNameText /F i /OUT pdfmark
showpage
} for
The PostScript is also available at http://www.jdawiseman.com/papers/bugs/20130918_Preview_Bug.ps
I have converted the PostScript to PDF using Adobe Distiller 8 (the latest version on my Mac), to make
http://www.jdawiseman.com/papers/bugs/20130918_Preview_Bug_Adobe8.pdf
and also with the GhostScript installed at PS2PDF.com to make
http://www.jdawiseman.com/papers/bugs/20130918_Preview_Bug_PS2PDF.pdf
The relevant line of the PostScript ends “/F i /OUT pdfmark”, which makes an ‘Outline’ item, that is, an item which appears with View > Table of Contents. Observe the “/F i”, which sets the formatting, over the four pages i looping from 0 to 3 in steps of 1. This /F defines the Formatting: 0 = Plain, 1 = Italic, 2 = Bold, 3 = Bold and Italic; as explained on page of 27 of http://www.adobe.com/devnet/acrobat/pdfs/pdfmarkReference_v9.pdf
Viewed in Preview 6.0.1 (765.6) on OS X 10.8.4 this looks like
http://www.jdawiseman.com/papers/bugs/20130918_Preview_Bug_Preview.png
Oops: formatting ignored. Me needled.
But in Adobe Professional 8 the two PDFs look like:
http://www.jdawiseman.com/papers/bugs/20130918_Preview_Bug_Adobe8_Acrobat.png
http://www.jdawiseman.com/papers/bugs/20130918_Preview_Bug_PS2PDF_Acrobat.png
Much about the Acrobat is messier than Preview, but it does correctly display this aspect of the PDF. Please could Preview do so as well?
Going back to the PostScript one could also add something like “/Color [0 0.6 0]”, which would set the colour of the text to dark green. That seems to be ignored by both Preview and Adobe Pro 8 (I don’t have v11 to test). Again, a fix would be welcomed.
And why do I care? Because the long PostScript program I maintain (see www.jdawiseman.com/placemat.html for manual and code) uses these features.
iMac