Theses, Books, Title pages ⇒ How to reduce file size of PDF output while compile with pdflatex
How to reduce file size of PDF output while compile with pdflatex
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
How to reduce file size of PDF output while compile with pdflatex
I run the code
\pdfminorversion=5
\pdfcompresslevel=9
\pdfobjcompresslevel=2
but i didn't notice any difference, is there a workaround script?
Byn.
How to reduce file size of PDF output while compile with pdflatex
I found an answer here saying it is works but dont know how to invoke it?
https://tex.stackexchange.com/questions ... is-too-big which works for pdflatex but on a unix system.
Script is here
gswin64c -dCompatibilityLevel=1.5 -dAutoRotatePages=/None -dQUIET -sDEVICE=pdfwrite -o "out.pdf" "in.pdf"
Byn
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
How to reduce file size of PDF output while compile with pdflatex
that should be done the command line aka command prompt: Windows Startmenu, Search, type
cmd
. Or search for the command line application.And it has to be done within the document folder aka directory. If needed, use the cd command to change into that directory.
Stefan
How to reduce file size of PDF output while compile with pdflatex
Have you had a try on it Stefan?
How to reduce file size of PDF output while compile with pdflatex
Whatever let you draw that conclusion? The very name "gswin64c" suggests a binary compiled for usage under M$ Windows. Under Unix and Unix-like platforms it's called "gs".byn wrote:Does anyone know how to use ghostscript to compress a file on a windows system.
I found an answer here saying it is works but dont know how to invoke it?
https://tex.stackexchange.com/questions ... is-too-big which works for pdflatex but on a unix system.
At the end of the Invoking Ghostscript section you'll find a brief overview for the different names on different platforms.
bash? That sounds more like Unix than M$ Windows...try gs instead of gswin64c.byn wrote: The code, doesn't seem to work for me, see error log below, [..]
KR
Rainer
How to reduce file size of PDF output while compile with pdflatex
Thank you, I tried it but it returned an error below;
my template is here; https://drive.google.com/file/d/17UKBW9 ... cjNa6/view
Could you demonstrate it with my template it would be easier if I can run it while compiling, I am using TeX live though I have a cygwin installation on windows.
How to reduce file size of PDF output while compile with pdflatex
Code: Select all
gs -dCompatibilityLevel=1.5 -dAutoRotatePages=/None -dQUIET -sDEVICE=pdfwrite -o main-template-reduced.pdf main-template.pdf

KR
Rainer
How to reduce file size of PDF output while compile with pdflatex
Still getting an error of unbalanced dictionary, below, how do you resolve this?