sudharakab / pdfsizeopt

Automatically exported from code.google.com/p/pdfsizeopt
0 stars 0 forks source link

Suggestion: use multivalent's -nopagepiece #30

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Using -nopagepiece with tool.pdf.Compress seems to be a good idea in
general. I have a file (unfortunately private, so I cannot post it) which
shrinks by 80%, over 20Mb with this option. 

Here is a patch:

Index: pdfsizeopt.py
===================================================================
--- pdfsizeopt.py       (revision 134)
+++ pdfsizeopt.py       (working copy)
@@ -5952,7 +5952,7 @@
       assert 0, 'Multivalent.jar not found, see above'
     assert ':' not in multivalent_jar  # $CLASSPATH separator

-    multivalent_cmd = 'java -cp %s tool.pdf.Compress %s' % (
+    multivalent_cmd = 'java -cp %s tool.pdf.Compress -nopagepiece %s' % (
         ShellQuoteFileName(multivalent_jar),
         ShellQuoteFileName(in_pdf_tmp_file_name))
     print >>sys.stderr, (

Original issue reported on code.google.com by lev.bishop on 25 Jan 2010 at 4:54

GoogleCodeExporter commented 9 years ago
In addition to -nopagepiece, would it be worth adding -nocore14 and -noalt?
http://multivalent.sourceforge.net/Tools/pdf/Compress.html suggests -nopagepiece
-nocore14 -subset -jpeg -noalt as the recommended options for posting on the 
web.
-subset is listed as experimental, and -jpeg might do lossy compression, but the
others seem ok.

Original comment by william.bader@gmail.com on 30 Mar 2010 at 1:05

GoogleCodeExporter commented 9 years ago
Thanks for the suggestion. Added -nopagepiece and -noalt in r149. I may add 
-nocore14 as well later as a pdfsizeopt feature.

Original comment by pts...@gmail.com on 10 Feb 2011 at 10:57