12-13 -optimize: Optimizing PDF Files

Processing

Optimizes PDF files.

Example of commands

[Executing example commands]

Optimize "test.pdf" under the following conditions and output it as "out.pdf".

  • Downsamples images.
  • Removes all annotations.
  • Removes attachments.

[Windows]

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

[Linux]

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

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.

Parameters

Parameter

Content

-optimizeImage {true | false}

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 {true | false}

Removes open actions. Can be omitted.

true: yes false: no

If omitted, it will not be deleted.

-removeOutlines {true | false}

Removes outlines. Can be omitted.

true: yes false: no

If omitted, it will not be deleted.

-removeAnnots {true | false}

Removes annotations. Can be omitted.

true: yes false: no

If omitted, it will not be deleted.

-removeArticles {true | false}

Removes articles. Can be omitted.

true: yes false: no

If omitted, it will not be deleted.

-removeThumbnails {true | false}

Removes thumbnails. Can be omitted.

true: yes false: no

If omitted, it will not be deleted.

-mergeFonts {true | false}

Merges fonts (*2). Can be omitted.

true: yes false: no

If omitted, fonts will not be merges.

-removeAttachment {true | false}

Removes attachments. Can be omitted.

true: yes false: no

If omitted, it will not be deleted.

-removeTag {true | false}

Removes tags. Can be omitted.

true: yes false: no

If omitted, it will not be deleted.

-removePieceInfo {true | false}

Removes PieceInfo. Can be omitted.

true: yes false: no

If omitted, it will not be deleted.

Please enter alt text.

[*1]
When downsampling is performed, the color space may differ from the original PDF data.

[*2]
When you merge fonts, only embedded fonts are merged. See "5-6 Merging Fonts" for product specifications regarding other font integrations.