Hello all,
I'm wirting a technical documentation with Lyx, and I'm facing a problem: when I generate the PDF file, it is huge (more than 50Mo for 70+ pages). This is due to the high number of pictures, but also to the resolution of the PDF file - I guess 600 dpi. However, I've not been able to find how I can reduce the PDF resolution (150 dpi or even less would be OK).
Any idea ?
I work on Ubuntu 10.10 64bits, with Lyx 1.6.7. I've created my own class.
Many thanks in advance for your help,
Regards,
François
LyX ⇒ Lyx document - smaller PDF file ?
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
Lyx document - smaller PDF file ?
Hi François,
welcome to the board!
welcome to the board!
-
You could try in your document preamble:
Ir requires PDF readers supporting PDF 1.5.Code: Select all
\pdfminorversion=5 \pdfobjcompresslevel=3 \pdfcompresslevel=9
- Or have a look at pdfsizeopt.
- You could also try XeLaTeX instead of pdfLaTeX and compare the results.
LaTeX.org admin
Re: Lyx document - smaller PDF file ?
Hi Stefan,
Many thanks for your quick reaction !
But... I tried, in vain:
- If I put the given commands in the Lyx preamble, I've an error message : \pdfminorversion cannot be changed after data is written.
- If I put the commands in my class file (.cls file), I've no more error, but the result is similar (more than 50Mo), even if I change the compression value (1 to 9)...
Regarding pdfsizeopt... hum... looks complex to install... (:<).
XeLatex : I don't have this option in the exporting format list (in Lyx)... how can I setup it ?
I hope you can still help (;>)
Regards,
François
Many thanks for your quick reaction !
But... I tried, in vain:
- If I put the given commands in the Lyx preamble, I've an error message : \pdfminorversion cannot be changed after data is written.
- If I put the commands in my class file (.cls file), I've no more error, but the result is similar (more than 50Mo), even if I change the compression value (1 to 9)...
Regarding pdfsizeopt... hum... looks complex to install... (:<).
XeLatex : I don't have this option in the exporting format list (in Lyx)... how can I setup it ?
I hope you can still help (;>)
Regards,
François
Lyx document - smaller PDF file ?
Hello all,
I finally found a simple way, using ghostscript to optimize file size.
The command is :
The result is a file 5x smaller than original one, without visible quality decrease.
I hoped to find a way to generate a smaller file, but this is a valuable workaround for me - until I find a solution at the source.
Regards,
François
I finally found a simple way, using ghostscript to optimize file size.
The command is :
Code: Select all
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=out.pdf fichierAComprimer.pdf
I hoped to find a way to generate a smaller file, but this is a valuable workaround for me - until I find a solution at the source.
Regards,
François
Last edited by Stefan Kottwitz on Mon Jan 23, 2012 6:56 pm, edited 1 time in total.