Optimization profiles
An optimization profile contains predetermined configuration settings that help you optimize a PDF document for a specific use. The Pdftools SDK offers four optimization profiles:
-
Web: Compress the file without affecting viewing quality on digital devices
- Removes redundant and unnecessary data for electronic document exchange
- Downsamples, clips, and intelligently compresses images
- Merges and subsets fonts
- Converts colors to RGB
-
Archive: Prepare a document for archiving in PDF/A format
- Removes redundant and unnecessary data for archiving
- Intelligently compresses images
- Merges and subsets fonts
-
Print: Compress the file without affecting print quality
- Removes redundant and unnecessary data for printing
- Downsamples, clips, and intelligently compresses images
- Merges and subsets fonts
- Converts colors to CMYK
-
Minimal file size: Remove redundant data and reduce image resolution to achieve a minimal viable file size
- Downsamples images
- Converts Type1 fonts to Type1C
- Removes metadata and output intents
-
Mixed Raster Content (MRC): Apply Mixed Raster Content (MRC) optimization intended for compressing scanned PDF files containing large amounts of text. The MRC can include:
- Splitting documents into foreground, background, and mask layers
- Heavily downsampling and compressing foreground and background layers
- Lossless compression of mask layers
- Merging and subsetting fonts
Web optimization profile
Web documents should stay small in file size. Smaller files take less storage on the web server and transfer faster, resulting in shorter download times.
To reduce the file size as much as possible, you can remove all information that isn’t required to display the document without a visual loss.
This may include:
- Downsampling images
- Clipping images to their visible parts
- Applying compressions algorithms with high compression ratios
- Collapsing redundant objects
- Removing unused resources
- Removing irrelevant information such as article threads, metadata, alternate images, and document structure information
- Merging and sub-setting embedded font programs
The Web optimization profile downsamples and recompresses images above 210 DPI to 150 DPI. This leads to smaller output files.
The profile uses the Balanced recompression strategy by default, which you can override through ImageRecompressionOptions.
Depending on the input PDF, the profile can also remove font programs of embedded standard fonts.
The profile can also linearize the PDF. Linearization restructures the file so a PDF viewer web browser plugin can fetch pages randomly and display selected pages before the whole file finishes downloading. The plugin must support linearized PDFs.
Save documents intended for screen display in RGB color space. RGB is the native format for any light-emitting device, such as a computer monitor or television. An RGB image uses three channels, so it takes up less space than a CMYK (cyan magenta yellow black) image, which uses four channels. The Web optimization profile converts all colors to RGB.
The Web optimization profile updates the output PDF version to PDF 1.7 or higher and removes PDF/A conformance.
Print optimization profile
For printing applications, file size isn’t the highest priority. Predictable printing matters more. This means using correct fonts, expected colors, and high-resolution images.
For that reason, the profile keeps data from the original document that’s needed for well-defined reproduction. The Print profile doesn’t remove embedded fonts or downsample images, with limited exceptions.
For many printing applications, converting images to the CMYK color space helps because CMYK works best in systems that reflect light (such as printed paper). The Print optimization profile converts all colors to CMYK for optimal output on printing devices.
In certain documents, the same font appears embedded multiple times. For example, if PDF-producing software embeds the same font for each page it creates, large multi-page documents may contain many copies of a font program. A document can also contain a complete font program when only a few glyphs appear in the document. In these cases, merging and subsetting font programs can speed up printing. The profile also converts embedded Type1 (PostScript) fonts to Type1C (Compact Font Format), which further reduces the file size.
There are still further ways to decrease the file size:
- Clipping images to their visible parts
- Compressing uncompressed images, for example, with a lossless compression type
- Collapsing redundant objects
- Removing unused resources
- Removing irrelevant information for printing such as thumbnails, article threads, and document structure information
The profile removes spider (web capture) information.
The Print profile doesn’t modify the resolution of images.
The profile uses the PreserveQuality recompression strategy by default, which you can override through the ImageRecompressionOptions property.
The Print profile updates the output PDF version to PDF 1.7 or higher and removes PDF/A conformance.
Archive optimization profile
For archiving, the priority is preserving PDF/A conformance, maintaining document fidelity and reproducibility over time. The profile performs only minimal document modification.
This may include:
- Removing alternative images
- Removing thumbnails
- Collapsing redundant objects
- Removing unused resources
The resolution and color space of images must remain untouched.
The profile uses the PreserveQuality recompression strategy by default to keep image quality as close to the original as possible. You can override this through the ImageRecompressionOptions property.
The Archiving profile copies all content objects such as annotations, form fields, and links. The Archiving profile keeps article threads, metadata, piece-info dictionaries, and the structure tree. The profile also flattens signature appearances.
For PDF/A conforming input files, the profile preserves PDF/A conformance when possible. For other files, it updates the PDF version to PDF 1.7 or higher.
Minimal file size optimization profile
In most cases, PDF optimization focuses on decreasing the file size.
You can achieve this by:
- Compressing images with an appropriate compression algorithm for lower image quality.
- Collapsing redundant objects.
- Removing unused resources.
- Removing irrelevant information for printing such as thumbnails, article threads, document structure information, and piece-info dictionaries.
- Remove output intents.
The MinimalFileSize conversion profile further reduces the output file size by converting embedded Type1 (PostScript) fonts to Type1C (Compact Font Format).
The Minimal file size profile also removes metadata and spider (web capture) information.
Output intents match the color characteristics of PDF page content to those of a target output device or production environment that prints the document. The minimal file size optimization profile removes output intents.
The profile downsamples and recompresses images above 182 DPI to 130 DPI.
This leads to smaller output files.
The profile uses the Balanced recompression strategy by default, which you can override through the ImageRecompressionOptions property.
Mixed raster content optimization profile
PDF files with scanned content can have a very large file size due to the high resolution of the images stored in scanned PDF files. Minimizing the image size while maintaining text readability is important for workflows involving scanned text documents.
The Mixed Raster Content (MRC) algorithm minimizes the image size while maintaining text readability. The MRC divides scanned documents into foreground, background, and mask layers, storing the textual information in the mask layer using a lossless compression type. The MRC heavily down-samples and compresses foreground and background layers. The file size is further reduced by removing redundant objects, optimizing resources, merging and subsetting embedded fonts.
The MRC profile updates the output PDF version to PDF 1.7 or higher and removes PDF/A conformance.