Chapter 15
Miscellaneous

15.1 Draft Documents

The -draft option removes bitmap (photographic) images from a file, so that it can be printed with less ink. Optionally, the -boxes option can be added, filling the spaces left blank with a crossed box denoting where the image was. This is not guaranteed to be fully visible in all cases (the bitmap may be have been partially covered by vector objects or clipped in the original). For example:

15.2 Blackening Text, Lines and Fills

Sometimes PDF output from an application (for instance, a web browser) has text in colors which would not print well on a grayscale printer. The -blacktext operation blackens all text on the given pages so it will be readable when printed.

This will not work on text which has been converted to outlines, nor on text which is part of a form.

The -blacklines operation blackens all lines on the given pages.

The -blackfills operation blackens all fills on the given pages.

Contrary to their names, all these operations can use another color, if specified with -color.

15.3 Hairline Removal

Quite often, applications will use very thin lines, or even the value of 0, which in PDF means ”The thinnest possible line on the output device”. This might be fine for on-screen work, but when printed on a high resolution device, such as by a commercial printer, they may be too faint, or disappear altogether. The -thinlines option prevents this by changing all lines thinner than <minimal thickness> to the given thickness. For example:

15.4 Garbage Collection

Sometimes incremental updates to a file by an application, or bad applications can leave data in a PDF file which is no longer used. This function removes that unneeded data.

15.5 Change PDF Version Number

To change the pdf version number, use the -set-version operation, giving the part of the version number after the decimal point. For example:

This does not alter any of the actual data in the file — just the supposed version number.

15.6 Copy ID

The -copy-id-from operation copies the ID from the given file to the input, writing to the output.

If there is no ID in the source file, the existing ID is retained. You cannot use -recrypt with -copy-id-from.

15.7 Remove ID

The -remove-id operation removes the ID from a document.

You cannot use -recrypt with -remove-id.

15.8 List Spot Colours

This operation lists the name of any “separation” color space in the given PDF file.

15.9 Removing Dictionary Entries

This is for editing data within the PDF’s internal representation. Use with caution.

15.10 Remove Clipping

The -remove-clipping operation removes any clipping paths from the file.