1

Why is my document pdf generated by pdflatex looks different from the one generated by latex+dvips+ps2pdf ? From the code below, i have tow different papers switch to the tow cited commands above :

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[francais]{babel}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{lipsum}
\author{M ROUAN SERIK}
\title{Article with \LaTeXe}
\fontfamily{cmr}
\begin{document}
\maketitle
\section{Titled section}
\lipsum
\end{document}

Here's my pdffonts for the tow pdfs :
Pdflatex:

name                   type     encoding  emb sub uni object ID  
------------------------------- ---------------- --- --- --- ---------  
AMTRHA+SFRM1728        Type 1    Custom   yes yes no       4  0  
DPTCLU+SFRM1200        Type 1    Custom   yes yes no       5  0  
JVZRKA+CMMI12          Type 1    Builtin  yes yes no       6  0  
UEWNID+SFBX1440        Type 1    Custom   yes yes no       7  0  
FOVERL+SFRM1000        Type 1    Custom   yes yes no       8  0  

latex+dvips+ps2pdf

name                                 type              encoding         emb sub uni object ID  
------------------------------------ ----------------- ---------------- --- --- --- ---------  
WVMUEH+SFRM1000                      Type 1C           WinAnsi          yes yes no        16  0  
ZHRBNN+SFBX1440                      Type 1C           WinAnsi          yes yes no      14  0  
IMJWCD+CMMI12                        Type 1C           Custom           yes yes no      12  0  
MDMSVR+SFRM1200                      Type 1C           WinAnsi          yes yes no      10  0  
TWHNMT+SFRM1728                      Type 1C           WinAnsi          yes yes no       8  0  
musarithmia
  • 12,463

1 Answers1

3

TL;DR The latex method via ps2pdf embeds Type 1C (compressed) fonts, while pdftex embed Type 1 (the same, but not compressed). This doesn't answer why they would look different on your system; thus I would guess it is some feature of your particular setup (and therefore "too localized").


Apparently the pdftex engine by default embeds Type 1 fonts, while ps2pdf by default (at least in the latex->dvips toolchain) embeds Type 1C. That is the fundamental difference between your two files.

@egreg tells me that Type 1C is just a compacted version of Type 1, so it seems unlikely the PDF viewer would render it any differently. On an up-to-date TeXLive system, the two methods of producing this PDF file should look the same.

Here's the output of pdffonts for the file compiled with latex->dvips->ps2pdf:

name                                 type              emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
KWSWPX+SFRM1000                      Type 1C           yes yes no      16  0
OPEHBW+SFBX1440                      Type 1C           yes yes no      14  0
EWKLCD+CMMI12                        Type 1C           yes yes no      12  0
QLBMBF+SFRM1200                      Type 1C           yes yes no      10  0
HVWRQD+SFRM1728                      Type 1C           yes yes no       8  0

Here's the output from the file compiled with pdflatex:

name                                 type              emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
AMTRHA+SFRM1728                      Type 1            yes yes no       4  0
GSTIVC+SFRM1200                      Type 1            yes yes no       5  0
JVZRKA+CMMI12                        Type 1            yes yes no       6  0
UEWNID+SFBX1440                      Type 1            yes yes no       7  0
FOVERL+SFRM1000                      Type 1            yes yes no       8  0

(By the way, you don't need \fontfamily{cmr} since that's the default. But you might consider \usepackage{lmodern} instead.)

musarithmia
  • 12,463
  • Thnks, but the problem is that i can't get the same result with both commands not you ! – Mehdi Rouan Serik Jan 29 '15 at 23:52
  • @MehdiRouanSerik, different process to create a PDF could result in different files. No problem with this. Different ways to mix ingredients could produce different cakes (even both still are choco cakes). – Sigur Jan 29 '15 at 23:58
  • I have the same result as you except for the encoding ! – Mehdi Rouan Serik Jan 30 '15 at 00:00
  • Sorry i'am novice at stack, i should edit my questions i did'nt know this. – Mehdi Rouan Serik Jan 30 '15 at 13:24
  • As far as I know, the difference between Type 1 and Type 1C (where C stands for CFF, Compact Font Format) is just that the latter type is a compacted version of the former, taking less space. – egreg Jan 30 '15 at 14:21
  • @egreg That would explain why I don't see any difference in the files. In the OP's setup, though, might different readers render these fonts differently? – musarithmia Jan 30 '15 at 14:22
  • @AndrewCashner I don't think so. – egreg Jan 30 '15 at 14:23
  • If i compile with xelatex i have a PDF like the one compiled with latex+dvips+ps2pdf not the pdflatex ? – Mehdi Rouan Serik Jan 31 '15 at 16:09
  • @MehdiRouanSerik Without knowing more I guess I would suggest that you just use pdflatex or xelatex unless there is some special reason to use latex/dvips/ps2pdf. – musarithmia Jan 31 '15 at 17:35
  • +1 for this answer, and (cc @egreg) even though Type 1C is just a compacted version of Type 1, (some) PDF viewers render(ed) them differently. (As I found out here.) – ShreevatsaR Nov 02 '16 at 23:35