13–13 -optimize: Optimizing PDF Files

13–13–1 Processing

Optimizes PDF files.

13–13–2 Example of commands

[Executing example commands]

Downsamples the images in test.pdf, removes all annotations, and output as out.pdf.

[Windows]

AHPDFToolCmd80.exe -optimize -optimizeImage true -removeAnnots true -d C:\test\test.pdf -o C:\sav\out.pdf

[Linux]

AHPDFToolCmd80 -optimize -optimizeImage true -removeAnnots true -d /home/antenna/test/test.pdf -o /home/antenna/sav/out.pdf

13–13–3 Folder settings: applied

You can perform batch processing by specifying the input folder to the -d parameter and the output folder to the -o parameter. If a folder is specified, optimization processing will be performed on the PDF files in the input folder. Note that the output file will be output to the output folder with the same name as the input file name.

13–13–4 Parameters

Parameter
Content
-optimizeImage Val
Performs image downsampling processing(*1). Can be omitted.
true: yes false: no
If omitted, downsampling will not be performed. Downsampling is done with the following settings: ・Bicubic method ・Color/grayscale image: If the resolution is 225dpi or higher, it will be reduced to 150dpi. ・Black and white images: If the resolution is 450dpi or higher, it will be reduced to 300dpi.

-removeOpenAction Val
Removes open actions. Can be omitted.
true: yes false: no
If omitted, it will not be deleted.
-removeOutlines Val
Removes outlines. Can be omitted.
true: yes false: no
If omitted, it will not be deleted.
-removeAnnots Val
Removes annotations. Can be omitted.
true: yes false: no
If omitted, it will not be deleted.
-removeArticles Val
Removes articles. Can be omitted.
true: yes false: no
If omitted, it will not be deleted.
-removeThumbnails Val
Removes thumbnails. Can be omitted.
true: yes false: no
If omitted, it will not be removed.
-mergeFonts Val
Merges fonts (*2). Can be omitted.
true: yes false: no
If omitted, fonts will not be merges.