0

I'm producing a PDF using Python 3.7 inside a Docker container and the result is pixelated (using adobe's pdf viewer). I'm wondering if me using TexLive basic-scheme and with the added packages shown below (some of which might be redundant, not sure) might cause this or not? I've prepared a similar question for stack overflow, but I'm holding on to it incase this might be a pure tex-related issue.

  • latexmk
  • latex
  • fmtcount
  • xkeyval
  • totpages
  • ifmtarg
  • etoolbox
  • tools
  • babel-swedish
  • xcolor
  • booktabs
  • hyperref
  • hyperxmp
  • eurosym
  • datetime
  • geometry
  • titlesec
  • chngcntr
  • fancyhdr
  • enumitem

Edit 2: I should also mention that my program renders the PDF using these commands:

latexmk -pdf -recorder filename.tex

And I've also tried:

pdflatex -interaction=nonstopmode filename.tex

(I don't need to run it twice now, as I believe recorder does for latexmk, but I might need it in the future)

Edit 1: Removed useless close-ups of the pixels and shared links to pdf examples as suggested. I am however unsure how to best present a proper MWE so that the problem can be reproduced. However, here below is the Latex part:

Style-file:

\ProvidesPackage{styfile}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[swedish]{babel}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{longtable}
\setlength\LTleft{0pt}
\setlength\LTright{0pt}
\usepackage{booktabs}
\usepackage{array}
\usepackage{multicol}
\newcommand{\mc}[2]{\multicolumn{#1}{l}{#2}}
\newcolumntype{R}{>{\raggedleft\arraybackslash}p{0.1\textwidth}}
\usepackage[
    pdfborder={0 0 0},
    colorlinks={true},
    linkcolor={black},
    urlcolor={blue}
]{hyperref}
\usepackage{hyperxmp}
\usepackage[yyyymmdd]{datetime}
\usepackage[bottom=25mm, footskip=30pt, top=110pt, headheight=150pt, headsep=5mm, left=25mm, right=25mm]{geometry}
\usepackage{calc}


\usepackage{fancyhdr}
\definecolor{footercolor}{HTML}{C0504D}
\newlength{\myoddoffset}
\setlength{\myoddoffset}{\marginparwidth}

\fancypagestyle{presentation}{%
    \fancyheadoffset[loh,reh]{\myoddoffset}
    \renewcommand{\headrulewidth}{0pt}
    \rhead{}
    \lfoot{\footnotesize \textbf{\unit{}, \today} \\ {\color{footercolor}Company $\cdot$ Address 1 $\cdot$ Address 2 $\cdot$ Phone $\cdot$ Web}}
    \cfoot{}
}

\fancypagestyle{plain}{%
    \renewcommand{\headrulewidth}{0pt}
    \lhead{}
    \lfoot{\footnotesize \textbf{\unit{}, \today} \\ {\color{footercolor}Company $\cdot$ Address 1 $\cdot$ Address 2 $\cdot$ Phone $\cdot$ Web}}
    \cfoot{}
}

Main file:

\documentclass[a4paper, 10pt]{article}

\usepackage{styfile}

\newcommand{\unit}{Unit}
\newcommand{\unitdetail}{Unit details}
\newcommand{\name}{Name Surname}
\newcommand{\role}{Role} 
\newcommand{\phone}{555-36356}
\newcommand{\email}{[email protected]}
\newcommand{\employmentyear}{2020}
\newcommand{\presentationtext}{Short descriptive text}


\newcommand{\portrait}{img/default.png}
\renewcommand{\dateseparator}{--}

\begin{document}
\thispagestyle{presentation}
\pagestyle{plain}
\noindent
\begin{minipage}[t]{0.3\textwidth}
    \strut\vspace*{-\baselineskip}\newline
    \begin{tabular*}{1\linewidth}{p{1\linewidth}}
        {\LARGE Curriculum vitae}\\
        \includegraphics[width=120pt, height=120pt]{\portrait} \\
        \textbf{\name} \\
        \role{} \\
        \unitdetail{} \\
        \\
        \textbf{Contact} \\
        \phone{} \\
        \href{mailto:\email}{\email} \\
    \end{tabular*}
\end{minipage}%
\hfill
\begin{minipage}[t]{0.6\textwidth}
    \strut\vspace*{-\baselineskip}\newline
    \begin{tabular*}{1\linewidth}{p{0.7\linewidth} r}
        {\Large Presentation} & \\
        \mc{2}{\presentationtext} \\
        \textbf{Employment at company} & \\
        \employmentyear & \\
        & \\
        \textbf{Previous Employments}& \\
        Company 1 & 2020\\
        & \\
        \textbf{Education} & \\
        Education 1 & 2020 \\
        & \\
        \textbf{Courses}& \\
        Course 1 & 2020 \\
    \end{tabular*}
\end{minipage}
\mbox{ }
\begin{longtable}{@{\extracolsep{\fill}}p{0.2\textwidth} p{0.65\textwidth} Rp{0.1\textwidth}}
    {\large Reference Assignment } & {\large Description} & {\large Time} \\
    \toprule
    \endfirsthead

    {\large Reference Assignment } & {\large Description} & {\large Time} \\
    \toprule
    \endhead

    \bottomrule
    \endlastfoot

    Assignment 1

    &
    Description 1
    &
    2020
    \\ \midrule
\end{longtable}
\end{document}

non-pixelated pdf

pixelated pdf

4
  • 2
    Posting the image of a single blown up letter is really not going to help us very much. Can you post an MWE, and perhaps link to the resulting .pdf somewhere?
    – Ingmar
    Mar 5, 2021 at 5:34
  • So what's the source difference between these two files? The pixelated PDF uses a different font (Type 3), which is indeed a pixel font that will not scale well. The nonpixel PDF uses Type 1 fonts, which are vector based.
    – Ingmar
    Mar 5, 2021 at 15:58
  • I think this might be about default fonts? You should probably specify a good one (Type 1, obviously) explicitly.
    – Ingmar
    Mar 5, 2021 at 16:05
  • 1
    You are correct and you might answer this question with your comment. The solution to my particular problem was to also install/include the cm-super package as suggested by Stefan Kottwitz over at latex.org. Link
    – grr473
    Mar 6, 2021 at 21:23

1 Answer 1

1

Your pixelated PDF uses a different font (Type 3), which is indeed a pixel font that will not scale well. The nonpixel PDF uses Type 1 fonts, which are vector based.

Specifying a font or, as you have discovered, installing a Type 1 variant of Computer Modern should solve the issue.

1
  • Thank you very much for the edit on my question. I'm scarce :-(
    – Sebastiano
    Apr 13, 2021 at 11:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .