1

I'm about to finish my paper on fractals, and because fractals can get very detailed I'm including a lot of EPS files at high DPI and lots of pictures... And that way the 40 pages long PDF is nearly 38MB big. I'm using Ghostscript to bring down the filesize, the command is:

"C:\Program Files\gs\gs9.10\bin\gswin64c.exe" -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dPDFSETTINGS=/prepress -dNOPAUSE -dQUIET -dBATCH -sOutputFile=small.pdf main.pdf

Which results in a file size of about 10 MB. But here's the catch, every image that is NOT an EPS and has transparency, the transparent parts get colored cyanish.. Screenshot of the compressed PDF

The screenshot shows the pdf outputted by ghostscript. The xelatex generated PDF however looks just fine. The image is a gif converted to png from Wikipedia

Sample code:

\documentclass[fontsize=12pt,a4paper]{scrreprt}
\usepackage[
  paper=a4paper,
  left=30mm,
  right=40mm,
  top=30mm,
  bottom=25mm,
  includefoot,
  foot=\baselineskip,
  bindingoffset=0mm]{geometry}

\usepackage[ngerman]{babel}
\usepackage{graphicx}
\usepackage{fontspec}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{tabularx}
\usepackage{colortbl}
\usepackage{booktabs}
\usepackage{wrapfig}
\usepackage{float}
\usepackage{caption}
\usepackage{pdfpages}
\usepackage[babel,german=guillemets]{csquotes}
\usepackage{url}
\setmainfont{Calibri}
\linespread {1.5}
\title{Something}
\author{Someone}
\date{2013}
\DeclareGraphicsExtensions{.pdf,.png,.jpg,.eps}
\begin{document}
\maketitle
\newpage
\tableofcontents
\newpage
\chapter{Einleitung}
\begin{figure}[H]
\centering
\includegraphics[scale=0.3]{antenne}
\caption[Quelle: \protect\url{http://de.wikipedia.org/wiki/Fraktalantenne}]{Patent einer Fraktalen Antenne}
\end{figure}
\end{document}

I know that this is not 100% TeX, but maybe some of you are familiar with Ghostscript...

Science
  • 53
  • 1
    As far as I know, PostScript doesn't support transparency (as opposed to PDF, which does). When you use ghostscript, although you have used the pdfwrite device, the PDF gets converted to PostScript (so it loses the alpha channel) then gets converted back to PDF. (I might be wrong, so I'm not writing this as an answer.) Someone with more knowledge of gs may provide a better answer. – Nicola Talbot Nov 03 '13 at 15:40
  • Could page groups be an issue? Could you provide the pdf? – Martin Schröder Nov 03 '13 at 21:37

0 Answers0