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
!!!
\input color \color{blue}
rather than\input pdfcolor \Blue
produces correct color. – user4686 Jan 14 '16 at 9:51LaTeX
you can use\documentclass{article} \usepackage[rgb]{xcolor} \begin{document} \color[cmyk]{1,1,0,0} \rule {5cm}{5cm} \end{document}
to produce the same output as with\color{blue}
. Thergb
option toxcolor
tells it to convert the color torgb
-model. I believe this means thepdf
is then created with something akin to\pdfliteral {0 0 1 rg 0 0 1 RG}
(apart from using the pdf color stack). I don't know why using a\pdfliteral
color specification incmyk
model seems to result in a very different color space at the time of pdf rendering. – user4686 Jan 14 '16 at 17:46\Blue
inpdfcolor.tex
is in an abstractcmyk
model, whose naive conversion torgb
model does correspond toR0 G0 B255
, this is for example whatxcolor
would do if asked to do that conversioncmyk->rgb
; but if one lets thecmyk
color spec inscribed as is inside thepdf
it will end up rendered very differently than the supposedly equivalentrgb spec
. Other (non-linear ?) conversions are done PDF spec. – user4686 Jan 14 '16 at 18:00%tex + dvipdfmx
\input color
\definecolor{myblue}{rgb}{0,0,1}
\definecolor{Myblue}{cmyk}{1,1,0,0}
\color{myblue}
\vrule width 5cm height 5cm
\color{Myblue}
\hskip5mm\vrule width 5cm height 5cm
\bye
– Akira Kakuto Jan 15 '16 at 5:12