[texhax] 365 KB .tex file makes 5.95GB .pdf

Lars Madsen daleif at math.au.dk
Tue Oct 28 14:32:46 CET 2014


just wondering here, why are you using LaTeX for this? There are surely more specialized tools for this like in the imagemagick bundle.

/Lars Madsen
Institut for Matematik / Department of Mathematics
Aarhus Universitet / Aarhus University
Mere info: http://au.dk/daleif@imf / More information: http://au.dk/en/daleif@imf


________________________________________
From: texhax [texhax-bounces at tug.org] on behalf of William Adams [will.adams at frycomm.com]
Sent: 20 October 2014 17:02
To: TeXHaX List
Subject: [texhax] 365 KB .tex file makes 5.95GB .pdf

I'm using pdflatex to open up ad graphic files and examine their sizes --- this seems to embed the files even though the ads are not placed.

Is that intentional? Is there some way to not do that?

Here's the code which I'm using to process the graphic:

%added to prevent ``too many open files'' error
\let\mypdfximage\pdfximage
\def\pdfximage{\immediate\mypdfximage}
\pdfximage{7221/#1.pdf}
\savebox\advert{\pdfrefximage\pdflastximage}
\settowidth{\advertwidth}{\usebox{\advert}}
\settoheight{\advertheight}{\usebox{\advert}}

Is there some way to release the graphic after examining its size?

William

--
William Adams
senior graphic designer
Fry Communications
Sphinx of black quartz, judge my vow.


_______________________________________________
TeX FAQ: http://www.tex.ac.uk/faq
Mailing list archives: http://tug.org/pipermail/texhax/
More links: http://tug.org/begin.html

Automated subscription management: http://tug.org/mailman/listinfo/texhax
Human mailing list managers: postmaster at tug.org



More information about the texhax mailing list