When viewed on screen, look of document processed via dvipdfmx
is better, than that of produced via pdftex
.
This happens with absolutely any document, even with plain format.
I tried with these viewers:
atril xpdf evince qpdfview mupdf okular gv zathura
Each of them produces different screen output on documents, obtained via dvipdfmx
(or dvips+ps2pdf
) and pdftex
.
As is shown on the pictures, in pdf mode the font color is grey and links color is blurry, in comparison with dvi mode.
$ pdffonts dvi.pdf
name type encoding emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
FESNVM+CMSY10 Type 1C Builtin yes yes yes 4 0
XZXPQO+CMR10 Type 1C Builtin yes yes no 5 0
CSTOKE+CMR8 Type 1C Builtin yes yes no 6 0
LXXLBC+CMBX10 Type 1C Builtin yes yes no 7 0
LIFJYF+CMTI10 Type 1C Builtin yes yes no 11 0
$ pdffonts pdf.pdf
name type encoding emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
IGWWSQ+CMSY10 Type 1 Builtin yes yes no 8 0
GVEKFU+CMR10 Type 1 Builtin yes yes no 9 0
JBEWTB+CMR8 Type 1 Builtin yes yes no 10 0
RRATMA+CMBX10 Type 1 Builtin yes yes no 11 0
YOSONK+CMTI10 Type 1 Builtin yes yes no 14 0
In one of the topics it was proposed to convert Type1 fonts to Type1C fonts via ps2pdf
, but the problem is that ps2pdf
converts fonts to raster images while creating pdf, thus this is not a proper way. Moreover, although the converted document is better, it is still a little blurry in comparison with the one, obtained via dvipdfmx
.
I will accept if this is not possible to correct pdf viewer or pdftex, but at least why do not I get the same look of the document from pdftex
and dvipdfmx
?
NOTE the answer should not assume changing fonts – default Computer Modern must be used.
UPDATE
This is very strange: compile the following code with pdftex
and tex+dvipdfmx
– the colors are not the same at all! Maybe this is the key for understanding this mystery?
1) code for dvipdfmx:
\special{color push rgb 0 0 1}
\vrule width 5cm height 5cm
\special{color pop}
\bye
2) code for pdftex:
\input pdfcolor
\Blue
\vrule width 5cm height 5cm
\bye
And the same for \Black
!!!
Best Answer
There were actually two clashing problems, which in the beginning I thought was one problem - and as such messed up some points in my question.
In light of newly revealed facts, I would like reclassify the above mentioned viewers into two categories.
a) the following viewers differ only with respect to color model (rgb vs. cmyk)
b) the following viewers differ with respect to color model and with respect to fonts handling (Type1 vs. Type1C)
1) Answer for the problem with color model:
use
\pdfliteral{0 0 1 rg}
and\pdfliteral{0 0 0 rg}
for blue and black correspondingly2) Answer for the problem with greyish look: convert the document with
ps2pdf
(it does not produce raster fonts, as I mistakenly wrote in my question)Now when I compare output of ps2pdf with output of dvipdfmx there are any differences.
The only thing left to do is to ensure that this ps2pdf command works without loss of information, i.e., how to convert back to Type1 fonts and compare hash sums with the original?
Summary: Apart from the problem with color model, I presume this to be a bug of pdf viewer and/or pdf library in handling Type1 fonts vs. Type1C fonts, because output of
gv
andmupdf
looks absolutely the same before and after processing withps2pdf
, as it should be.