Upsample/downsample images

Sometimes it is required by a printer that all images in a PDF have at least a certain resolution. This can be difficult, especially if the low-res images are not available in a higher resolution, or the other way around.

With pdfToolbox you have the possibility to downsampling or upsampling images by using the following Fixup types:

Downsample/compress images

  1. You can choose between 5 different downsampling methods. Which method should be used for recalculation depends on the images contained in the PDF and should therefore be determined individually (The quality after resampling with Lanczos is in most cases the best).
    The available downsampling methods are:
    • Average downsampling
    • Subsampling
    • Bicubic downsampling
    • Lanczos downsampling
    • BlackmanSinc downsampling
  2. "To": The target resolution in ppi
  3. "For images above": Image resolutions that are above the specified threshold will be downsampled.
  4. You can choose between different compressions:
    • Retain exising
    • Retain existing, but change quality
    • JPEG2000
    • JPEG
    • ZIP
  5. "Quality": Allows for specifying the quality level in which JPEG objects are saved after the conversion.
    Note: The given value is interpreted as a percentage declaration between 0 and 100. The table below shows the possible values and the corresponding setting in Adobe Photoshop.
  6. "Apply to": Here you can set a filter to exclude certain images from the resampling process.
  7. "Downsample multiple used images separately": If an image file is contained multiple times in a document in different sizes or reflections, setting this check box will inspect each image reference separately and downsample it if necessary.
  8. "Apply recompression even if images are not downsampled":  If the checkbox is activated, all images contained in the document will be compressed with the selected compression.

Possible values and corresponding setting in Adobe Photoshop

Adobe photoshop values JPEG quality compression
20 Minimum
40 Low
60 Medium
80 High
100 Maximum

Upsample/compress images

Upsampling images increases the pixel resolution of the image, but does not result in a visual improvement.

  1. You can choose between 4 different upsampling methods. Which method should be used for recalculation depends on the images contained in the PDF and should therefore be determined individually (The quality after resampling with Lanczos is in most cases the best).
    The available upsampling methods are:
    • Average upsampling
    • Bicubic upsampling
    • Lanczos upsampling
    • BlackmanSinc upsampling
  2. "To": The target resolution in ppi
  3. "For images below": Image resolutions that are below the specified threshold are upsampled.
  4. You can choose between different compressions:
    • Retain exising
    • Retain existing, but change quality
    • JPEG2000
    • JPEG
    • ZIP
  5. "Quality": Allows for specifying the quality level in which JPEG objects are saved after the conversion.
    Note: The given value is interpreted as a percentage declaration between 0 and 100. The table above shows the possible values and the corresponding setting in Adobe Photoshop.
  6. "Apply to": Here you can set a filter to exclude certain images from the resampling process.
  7. "Upsample multiple used images separately": If an image file is contained multiple times in a document in different sizes or reflections, setting this check box will inspect each image reference separately and upsample it if necessary.
  8. "Apply recompression even if images are not upsampled":  If the checkbox is activated, all images contained in the document will be compressed with the selected compression.

More about the methods

When to use which method totally depends on the user. Here are some external links to: