/  Home  PDF-Tools  Document  Support

PDF Compress Command Line User Manual

Overview

PDF compress command line is an interface tool to fulfill part of the functions of Advanced PDF Tools such as optimizing PDF files and compressing images. In order to get a small PDF file while still maintaining accessibility and search engine visibility, PDF compress command line provides two ways to reduce the file size, one is to remove redundancy information, and the other is to compress image by using the standard compression algorithms.

Features

Command line usage

Advanced PDF Tools Copyright @ 2000 - 2006 VeryPDF.com Inc
Website: http://www.verypdf.com
Release Date: May 28 2006
Usage:

pdfcompress -i C:\input.pdf -o C:\output.pdf     

the option -i is to input a PDF file, and -o is to specify a destination file.

Note: When you run the command line, you should write a configuration file "compress.ini" to describe the optimizing and compressing options first, e.g.,

compress.ini

[data]
removemetadata=1
removejavascript=1
removethumb=1
removecomment=1
removeembeddedfile=1
removebookmarks=1
removeprivatedata=1
removenamesdestination=1
removeform=1
compressstream=1

[colorimage]
compressformat=1
quality=80
imagesize=94

[monimage]
compressformat=1
imagesize=95

Data optimizing

Data optimizing is to remove some redundancy information to reduce the file size, such as metadata, bookmarks, embedded files, thumbnails, etc.

The option removemetadata is to remove the metadata from the input file.
removemetadata=value

where the value can be "1" to remove the metadata, or "0" to retain the metadata

The option removejavascript is to remove javascript codes from the input file.
removejavascript=value

where the value can be "1" to remove or "0" to retain.

The option removethumb is to remove thumbnails from the input file.
removethumb=value

where value can be "1" to remove thumbnails or "0" to retain thumbnails.

The option removecomment  is to remove comments from the input.
removecomment=value

where value is "1" to remove comments from your PDF file or "0" to retain comments.

Option removeembeddedfile is to remove embedded file from the input.
removeembeddedfile=value

where the value can be "1" to remove embedded file from the input file or "0" to retain.

The option removebookmarks is to remove bookmarks from the input file.
removebookmarks=value

where the value can be "1" to remove bookmarks or "0" to retain.

The option removeprivatedata is to remove private data from the input.
removeprivatedata=value

where value can be "1" to remove the private data from the input file, or "0" to retain.

To remove names destination from the input by the option removenamesdestionation.
removenamesdestination=value

where the value can be "1" to remove names destination from the input file, or "0" to retain.

The option removeform is to remove form actions from the input.
removeform=value

where the value can be "1" to remove all form actions , or "0" to retain.

The option compressstream is to recompress data stream.
compressstream=value

where value can be "1" to search and recompress the uncompressed streams by using Flate algorithm, or "0" to retain the original streams.

Note:  "0" the default value of all the options. You can write the options in the file "compress.ini" only those you want to remove where others can be regarded as "0" in default by the system, e.g.,

[data]
compressstream=1

in the list of "compress.ini", which means to search and recompress the uncompressed streams and retain other objects, such as metadata, thumbnails, bookmarks and so on.

If you want to know more information about the redundancy information, please see Optimizing your PDF files.

Image compressing

There are three kinds of image, color, gray and monochrome, and each can be set the compression format, quality and image scale size.

compressformat=compressformatvalue
quality=qualityvalue
imagesize=imagesizevalue

where the parameter compressformat is to choose a compression algorithm such as Flate, JPEG, CCITT, etc., the parameter quality is to specify the image compressing quality, and the imagesize is to specify the scale ratio to the image. The compressformatvalue, qualityvalue and imagesizevlaue are the number to set the value of parameters, respectively.

compressformat=3

0: Not change; 1: Flate compression; 2: JPEG compression; 3: JPEG2000 compression
where 0 is the default value.

quality=40

Set quality to color image, the value is from 1 to 100
where 100 is the default value.

imagesize=70

Set scale ratio to color image, the value is from 1 to 100
where 100 is the default value.

compressformat=2

0:original, 1:Flate, 2:JPEG
where 0 is the default value.

quality=20

Set quality to gray image, the value is from 1 to 100
where 100 is the default value.

imagesize=70

Set scale ratio to gray images, from 1 to 100
where 100 is the default value.

compressformat=2

0: Not change; 1: Flate compression; 2: CCITT Group4 compression
where 0 is the default value.

quality=60

Set quality to monochrome image, the value is from 1 to 100
where 100 is the default value.

imagesize=70

Set scale ratio to black and white image, the value is from 1 to 100
where 100 is the default value.

For more information about the compression algorithm, please see Compressing your PDF files.

Advanced PDF Tools Command Line Home page.


PDF DOCUMENT SUMMARY :: PDF SUMMARY MAKER :: PDF PAGE NUMBERER :: PDF INFO CHANGER :: PDF SHRINK :: PDF INFORMATION MANAGER  :: PDF INFORMATION EDITOR :: JPEG2000 :: PDF COMPRESS :: PDF OPTIMIZER :: PDF REDUCER :: PDF LINEARIZATION :: PDF METADATA :: PDF COMPRESSOR :: PDF PAGE COUNTER

Copyright © 2000-2006 by VeryPDF.com, Inc.
Send comments about this site to the webmaster.