PDF Compressor

Compress PDF using JPEG2000 technology by command line

   VeryDOC PDF Compressor can help you compress color scanned PDF down to the same size as black and white TIFF Group 4 images by JPEG2000 technology. JPEG2000 is an image compression standard and coding system, which was created with the intention of superseding their original discrete cosine transform-based JPEG standard with a newly designed, wavelet-based method. By this method, we can reduce 100 times of their original size while maintaining better image quality and text legibility. Now let us check the JPEG2000  compression effect from the following snapshot. Even if you compress image by 1:100 times, the quality is still good.

compress image by JPEG2000
     Compress image by JPE2000

In the following part, let us check how to use this software and this technology to compress PDF.

Step 1. Download PDF Compressor

  • This software is Windows command line application, when downloading finishes, there will be an zip file. Please unzip it and then check elements in it and find the executable file.
  • Before run the conversion, you’d better read the website and help document then you can know more about this software. 

Step 2. Compress PDF by JPEG2000 through 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 by method JPEG2000, please refer to the following command line template. pdfcompressor.exe -jbig2 C:\in.pdf C:\out.pdf
    By this command line, you can compress PDF by JBIG2 arithmetic.
    pdfcompressor.exe -jbig2 -jpx C:\in.pdf C:\out.pdf
    By this command line, you can compress color and grayscale image streams with JPEG2000 arithmetic.
    Now let us check the related parameters:
  • -jbig2    :by this parameter, you can compress monochrome image streams with JBIG2 arithmetic
    -jpx       : by this parameter, you can compress color and grayscale image streams with JPEG2000 arithmetic
    -jpxquality <string>: when you need to set Quality for JPX Compression, from 0.0 to 100.0, default is 0.5

  • When you need to do batch compression, please refer to the following command line templates. You can either use wild character or use for mode.
     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"
  • This software provides three strategies to compress PDF file.
    1. Subset fonts in PDF files. This method is good when you need to process text based PDF file.
    2. Compress image streams with JBIG2 and JPEG2000 technologies.
    3. Remove unused objects (a garbage collector for PDF files). This method is good when you need to create Web-friendly PDF files

If you need to know more about this software, please visit its homepage and website. During the using, if you have any question, please contact us as soon as possible.

PDF Compressor

Compress PDF with colorful images by professional methods

   There are many kinds of PDF files you may meet when you need to compress PDF files. If you compress PDF by the same method, the compression effect will not be good. Take compressing PDF with colorful image for example, VeryDOC PDF Compressor will give you professional method to process them. In the following part, I will show you how to compress PDF by command line.

Step 1. Download PDF Compressor Command Line

  • If you need to use this software on the single computer or laptop, please download the server version which either can be used on server or single computer.
  • When downloading finishes, there will be an zip file. Please extract it to some folder then call the executable file in MS Dos Windows.

Step 2. Compress PDF with colorful image by command line

  • When you use this software, please refer to the usage and example. And this software is Windows application, now it can not work under Mac and Linux version.
  • Usage:        pdfcompressor [options] <pdf-file> [<out-pdf>]
  • When you need to compress PDF with colorful image, there are some options available for you.
  • -ci <string>  : when you need to set Color Image Compression, there are three values: jpx, jpg, zip for you to choose.
    -cidown         : you can try to downsample color images.
    -cidownres <int>       : Set Color Image Resolution. By this parameter, you can try to compress colorful image by adjusting image resolution.
    -jpxquality <string>   : Set Quality for JPX Compression, from 0.0 to 100.0, default is 0.5
    -cidowntype <int>      :When you need to  downsample type for color images, there are four values for you to choose.

          -cidowntype 0: default
          -cidowntype 1: Subsample
          -cidowntype 2: Average
          -cidowntype 3: Bicubic
    Here are some examples:
    pdfcompressor.exe -jpx -jpxquality 1 C:\in.pdf C:\out.pdf
    By above command line, you can compress PDF by jpx method and specify Quality for JPX Compression as 1. The range of compression quality is from  0.0 to 100.0, default is 0.5. Please check the following two command line templates as examples.
    pdfcompressor.exe -jpx -jpxquality 0.5 C:\in.pdf C:\out.pdf
    pdfcompressor.exe -jpx -jpxquality 10 C:\in.pdf C:\out.pdf
    pdfcompressor.exe -ci jpx -mi jbig2 C:\in.pdf C:\out.pdf
    By the above command line, you can compress image by jpx and set Monochrome Image Compression values as jbig2l. Please check more examples in the following part.
    pdfcompressor.exe -ci jpx -gi jpx -mi jbig2 C:\in.pdf C:\out.pdf
    pdfcompressor.exe -ci jpg -cidown -cidownres 50 -cidowntype 1 C:\in.pdf C:\out.pdf
    pdfcompressor.exe -gi jpg -gidown -gidownres 50 -gidowntype 1 C:\in.pdf C:\out.pdf
    pdfcompressor.exe -mi fax -midown -midownres 50 -midowntype 1 C:\in.pdf C:\out.pdf

If you need to know more examples and usage, please check them in the readme.txt or on our website. And this software also provides many other methods of compress grey image PDF, or text based PDF file. During the using, if you have any question, please contact us as soon as possible.

@VeryDOC

Compress image PDF by command line and preset screen option

   In this article, I will show you how to compress image PDF and preset screen options by command line. Image PDF is often converted from image or scan file, and it can not be copied and pasted. When compress those PDF file, please use compressing image PDF method.

    And  PDF preset is a group of settings that affect the process of creating a PDF. These settings are designed to balance file size with quality, depending on how the PDF are used. Most predefined presets are shared across most of PDF application. Here I will take setting screen preset for example to show you how to do compression and presetting to PDF together.

Step 1. Download VeryDOC PDF Compressor

  • The method I used here is under the help of software VeryDOC PDF Compressor, which is a professional tool of compressing Adobe Acrobat PDF files, it can reduce PDF file size up to 40-95% using PDF optimization technology for PDF file compression.
  • This is command line version software, once downloading finishes, there will be an zip file. When downloading finishes, please unzip it then you can check the elements in it.

Step 2. Compress PDF by Command Line

  • When use this software,pl ease refer to the usage and examples. Here I will list some of it.
  • Usage:pdfcompressor [options] <pdf-file> [<out-pdf>]
  • When compress PDF and preset screen options, please refer to the following command line templates.
  • pdfcompressor.exe -preset screen C:\in.pdf C:\out.pdf
    pdfcompressor.exe -preset ebook C:\in.pdf C:\out.pdf
    pdfcompressor.exe -preset printer C:\in.pdf C:\out.pdf
    pdfcompressor.exe -preset prepress C:\in.pdf C:\out.pdf
    pdfcompressor.exe -preset default C:\in.pdf C:\out.pdf
    Check related parameters
    -preset <string>       : Preset options to compress PDF file, values: screen, ebook, printer, prepress, default
    If you do not add special parameters, this software will compress PDF file by default method. However, when compressing image PDF, please use some special method then you can get the better compression effect.
    Here are some examples for your reference
    -ci <string>           : Set Color Image Compression, values: jpx, jpg, zip
    -cidown                : Downsample color images
    -cidownres <int>       : Set Color Image Resolution
    -cidowntype <int>      : Downsample type for color images:
            -cidowntype 0: default
            -cidowntype 1: Subsample
            -cidowntype 2: Average
            -cidowntype 3: Bicubic

      -gi <string>           : Set Grayscale Image Compression, values: jpx, jpg, zip
      -gidown                : Downsample Grayscale images
      -gidownres <int>       : Set Grayscale Image Resolution
      -gidowntype <int>      : Downsample type for Grayscale images:
            -gidowntype 0: default
            -gidowntype 1: Subsample
            -gidowntype 2: Average
            -gidowntype 3: Bicubic

    The above parameters can also help you compress the image part in PDF file. And when in our knowledge base, we will publish articles about how to compress text based PDF files. During the using, if you have any question, please contact us as soon as possible.

PDF Compressor

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.

EMF to Vector Converter

How to call EMF to Vector Command Line Server License from C# and Windows Service?

 

Hi,

We've just bought a license of emf2vec.exe yesterday and I registered it using

emf2vec.exe "-$" "XXXXXXXXXXXXXXXXXXXXXX"

It works OK when I call it in batch file, but when I call it from a Windows service application developed in c# with MS Visual Studio 2005, it does not work! ( see C# codes below)

Any help or suggestions on this will be greatly appreciated.
Regards,

Simplified version of C# codes:
...
Process myProcess = null;
myProcess = new Process();
paramStr = @" -xres 600 -yres 600 in.emf out.tif";
myProcess.StartInfo.FileName = @"C:\emf2vec\emf2vec.exe";
myProcess.StartInfo.Arguments = paramStr;
myProcess.StartInfo.CreateNoWindow = true;
myProcess.Start();
...

Customer

----------------------------------------------------------------------------

Please arrange your service run from Administrator user account to try again, we hoping you will get it work fine with this option.

VeryDOC

----------------------------------------------------------------------------

Thanks, but the windows service app had been run from the administrator's account all the time and I had also tried to set emf2vec.exe (version 2.0.0.1) in different compatibility modes and with and without the allow non-administrators to run this program checked.

By the way, the server on which the service app is running is MS Windows Server 2003 R2, Enterprise Edition, Service Pack 2

Hope you can think of something else I can try.
Thanks again,

Customer

----------------------------------------------------------------------------

Please consider this issue resolved: I created a Console application using C# to replace the window service application: emf2vec.exe works well when called from the console application.
Thanks,

Customer

----------------------------------------------------------------------------

Thanks for your message, yes, you are right, the Windows application can not be shown from a service, so the Windows Service application will simple hang, the console application can be called from Windows Service without this problem.

VeryDOC