# [OS X TeX] Mysterious behavior of Preview.app

Jin-Hwan Cho chofchof at ktug.or.kr
Thu May 15 08:55:32 CEST 2008

On May 15, 2008, at 2:51 PM, Axel E. Retif wrote:

> On May 14, 2008, at 21:09, Jin-Hwan Cho wrote:
>
>> The following PDF file shows some mysterious behavior of Preview.app.
>>
>> http://project.ktug.or.kr/dvipdfmx/sample/misc/pplr8r.pdf
>>
>> Check the characters in the first line. If it was opened with
>> Preview.app,
>> you may see some european characters with accents. But with
>> Adobe Reader, you may see completely different result and that is the
>> the right one.
>
> And not only the first line is wrong, but many others, especially in
> the lower half. The problem not only appears in Preview, but with
> all the programs that use Apple's PDF renderer: TeXShop, Skim,
> PDFView.

Then, it says that the PDF renderer in Mac OS X does not show the PDF
file above correctly.
That is what I expected.

> It renders the same in Adobe Reader 8 and Acrobat Professional 6
> (Mac OS 10.4.11), and, under Ubuntu 7.10, Evince Document Viewer 2
> and Xpdf 3.

Do you mean that you get the wrong result even in Adobe Reader 8?

> Now the curious thing ---I did my own tables for pplr8r with ``tex
> testfont'', ``pdftex testfont'' and ``xetex testfont'', each one
> rendered correctly: the same viewed with TeXShop and Skim or Adobe
> Reader. In the case of ``tex testfonf'' the dvi was converted by
> TeXShop and Skim to PDF, but also TeXniscope showed the dvi correctly.
>
> Next I tried XeTeX (0.997) with ``xelatex nfssfont.tex'' and font
> ``pplr8r.tfm'', and the output renders again correctly: the same
>
> To summarize: your PDF indeed shows different output with
> applications that use Apple's PDF renderer, on the one hand, or
> Adobe Reader, on the other; but my own tests show the same output in
> all applications.

If you use MacTeX in the intel machine, you can generate the PDF file
above as follows:

http://project.ktug.or.kr/dvipdfmx/contrib/bin/dvipdfmx-20080515-i386-darwin

(3) Run "latex nfssfont" and then give two commands: pplr8r and then
\table\bye

(4) Make "cid-x.map" in the working directory with the one line
"pplr8r 8r :0:Palatino"

(5) Link the Palatino font to the working directory. In the case of
Leopard, "ln -s /Library/Fonts/Palatino ."

(6) Run "dvipdfmx nfssfont" to get the PDF result.

(7) Check the contents with two PDF viewers, Previewer.app and Adobe