I am discovering LuaLaTeX...
I want to produce pdf files from my tex sources as small as possible.
If I compile the following code with LuaLaTeX, the size of the generated pdf is 9 kB.
\documentclass{article}
\usepackage{titlesec}
\usepackage{titling}
\usepackage{fontspec}
% Specify different font for section headings
\newfontfamily\headingfont[]{Gill Sans}
\titleformat*{\section}{\LARGE\headingfont}
\titleformat*{\subsection}{\Large\headingfont}
\titleformat*{\subsubsection}{\large\headingfont}
\renewcommand{\maketitlehooka}{\headingfont}
\author{An author}
\title{The title of the article}
\date{\today}
\begin{document}
\maketitle
\section{A section}
\subsection{A subsection}
\subsubsection{A subsubsection}
\end{document}
If I compile the same code with LaTeX but with a difference of font, the resulted files is 49 kB large. I guess the difference doesn't come from LaTeX ou LuaLaTeX but from the fonts. Something like : "my pdf system knows better about the Gill Sans font than the default LaTeX fonts".
\documentclass{article}
\usepackage{titlesec}
\usepackage{titling}
%\usepackage{fontspec}
%% Specify different font for section headings
%\newfontfamily\headingfont[]{Gill Sans}
%\titleformat*{\section}{\LARGE\headingfont}
%\titleformat*{\subsection}{\Large\headingfont}
%\titleformat*{\subsubsection}{\large\headingfont}
%\renewcommand{\maketitlehooka}{\headingfont}
\author{An author}
\title{The title of the article}
\date{\today}
\begin{document}
\maketitle
\section{A section}
\subsection{A subsection}
\subsubsection{A subsubsection}
\end{document}
Can someone confirm this? Is there a rule to learn from this if one wants to produce very light files?
PS : If I use the same font, I get the same size !
PPS : Strangely, if I apply ghostscript on the pdf file generated by LuaLaTex, the size gets bigger (from 9 kB to 12 kB !). The file generated by LaTex : from 49 kB to 13 kB.
PPPS : In my naive way of understanding things, using a custom font, such as Gill Sans would normally produce a bigger file than if using the standard font.
ko. I just thought that was a typo. Now it's nice to know where that comes from. – A.Ellett Oct 11 '13 at 20:47In a second step you can extract the embedded ressources with mutool from the sumatrapdf-package (mutool.exe extract).
In a last step I would use mutool to convert a binary PDF to an ASCII PDF to have a deeper look inside (mutool.exe clean -d).
Can you post two PDF-files for those who do not have PDFLaTeX and LuaLaTeX available right now?
– Hanseat Oct 15 '13 at 11:57