Compress PDF in Batch by Command Line

  When you need to compress PDF in batch by command line or compress PDF together with : C#, C++, Delphi, Visual BASIC, VB.net, etc), please have a free trial of software VeryDOC PDF Compressor. This software is a professional tool for compressing PDF files, as it takes the latest image compression technology and the new JBIG2 & JPEG2000 compression formats, which  make it the most compact, Web-friendly PDF files available. In the following part, I will show you how to compress in batch by this software.

Step 1. Download PDF Compressor Command Line

  • As it is command line version software,we have compressed it to zip file. When downloading finishes, there will be an zip file, please extract it to some folder then you can call it from MS Dos Windows.
  • Please note this software is Window application, now it can not work under Mac and Linux system.

Step 2.  Compress PDF in Batch by Command Line

  • When run the conversion, please refer to the usage and examples.
  • Usage:pdfcompressor [options] <pdf-file> [<out-pdf>]
  • When you need to compress PDF in batch or from system, please refer to the following command line templates.
  • pdfcompressor.exe C:\in.pdf C:\out.pdf
    pdfcompressor.exe C:\in\*.pdf C:\out\*.pdf
    for %F in (D:\test\*.pdf) do "pdfcompressor.exe" "%F" "%~dpnF-out.pdf"
    for /r D:\test %F in (*.pdf) do "pdfcompressor.exe" "%F" "%~dpnF-out.pdf"
    When you do the batch conversion, you can either use wild character or bat files.

There are three methods to compress PDF provided by this software, they are:
1. Subset fonts in PDF files.
2. Compress image streams with JBIG2 and JPEG2000 technologies.
3. Remove unused objects (a garbage collector for PDF files).

Please use the corresponding method according to your PDF files. When there are mainly fonts in PDF file, please use  method of Subset fonts in PDF files to compress PDF files. When handling PDF full of images, please use method of Compress image streams with JBIG2 and JPEG2000 technologies. When you need to make fast web view of compressing, maybe you can use method of Remove unused objects (a garbage collector for PDF files).

Here are some parameters like:
-winfont               : Use Windows fonts to replace Base14 fonts
-embedallfonts         : Embed all fonts
-subsetfonts           : Subset fonts
-compressfonts         : Compress fonts
-pwdinpdf <string>     : Open password for input PDF file
-pdfa                  : Create PDF/A file
-nobookmarks           : Don't generate bookmarks in output PDF file
-jbig2                 : Compress monochrome image streams with JBIG2 arithmetic
-jpx                   : Compress color and grayscale image streams with JPEG2000 arithmetic

  As to which parameters should be used, please check parameter list on our website or the readme.txt. During the using, if you have any question, please contact us as soon as possible.

VN:F [1.9.20_1166]
Rating: 5.2/10 (6 votes cast)
VN:F [1.9.20_1166]
Rating: -2 (from 2 votes)
Compress PDF in Batch by Command Line, 5.2 out of 10 based on 6 ratings

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!