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
I am using pdflatex to compile on a windows system and I wonder how the file size can be reduced while compiling with pdflatex
- Stefan Kottwitz
- Site Admin
- Posts: 10290
- Joined: Mon Mar 10, 2008 9:44 pm
How to reduce file size of PDF output while compile with pdflatex
Hi Stefan,
I run the code
\pdfminorversion=5
\pdfcompresslevel=9
\pdfobjcompresslevel=2
but i didn't notice any difference, is there a workaround script?
Byn.
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
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.
Script is here
gswin64c -dCompatibilityLevel=1.5 -dAutoRotatePages=/None -dQUIET -sDEVICE=pdfwrite -o "out.pdf" "in.pdf"
Byn
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: 10290
- Joined: Mon Mar 10, 2008 9:44 pm
How to reduce file size of PDF output while compile with pdflatex
Hi Byn,
that should be done the command line aka command prompt: Windows Startmenu, Search, type
And it has to be done within the document folder aka directory. If needed, use the cd command to change into that directory.
Stefan
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
LaTeX.org admin
How to reduce file size of PDF output while compile with pdflatex
The code, doesn't seem to work for me, see error log below,
Have you had a try on it Stefan?
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
Rais,
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.
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
Well, you just need to replace "in.pdf" with the file you created with pdflatex and I'd suggest a different name for the result instead of "out.pdf", too, e.g.,
that created a pdf with 132K out of your 293K
KR
Rainer
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
Rais,
Still getting an error of unbalanced dictionary, below, how do you resolve this?
Still getting an error of unbalanced dictionary, below, how do you resolve this?