3-Heights™ PDF Optimizer - compress your PDF and reduce the file size

The 3-Heights™ PDF Optimizer optimizes PDF files to enable their use as high resolution files for printing or, with less resolution, for electronic document exchange or space-saving document archiving. 

Compress

Resize your files according to your requirements

Optimize

Define color scheme and fonts for printing

Reduce

Scale document information down to necessary data

Advanced PDF document optimization & PDF compression features

PDF optimizer - features

Easy configurability through optimization profiles:

  • Web profile
    • Remove redundant and unnecessary data for electronic document exchange
    • Down-sample, clip, and intelligently compress images
    • Merge and subset fonts
    • Linearize the output
    • Convert colors to RGB
  • Archive profile
    • Remove redundant and unnecessary data for archiving
    • Intelligently compress images
    • Merge and subset fonts
  • Print profile
    • Remove redundant and unnecessary data for printing
    • Down-sample, clip, and intelligently compress images
    • Merge and subset fonts
    • Convert colors to CMYK

Features and fine grained configuration for optimizing images

  • Separately configurable compression of bi-tonal, indexed and continuous (i.e. color and gray-scale) images
  • Define threshold in dots per inch (DPI) for triggering image down-sampling
  • Define target image resolution in DPI for image down-sampling
  • Automatically select best compression type for each image
  • Configure enforcement of configured compression types
  • Color conversion to CMYK, RGB, or GrayScale
  • Remove invisible parts of images
  • Reduce the number of color channels used for images, image masks and soft masks if applicable
  • Convert soft masks to image masks if applicable
  • Perform mixed raster content (MRC) optimization for images
  • Choose color management engine
  • Remove images entirely and substitute by empty XObjects

Features and fine grained configuration for optimizing fonts

  • Subset font programs to contain only the used glyphs
  • Merge compatible font programs and fonts
  • Compress Type1 fonts (convert to CFF)
  • Remove font programs

Features for optimizing page content 

  • Remove unused resources
  • Automatic page content optimization
  • Flatten or remove page annotations and form fields

Fine grained configuration for removal of:

  • Redundant objects
  • Embedded standard fonts (e.g. Courier, Arial, Times)
  • Embedded, non-symbolic fonts
  • Unnecessary file information
  • Article threads
  • Alternative images
  • Metadata
  • Page piece information
  • Output intent
  • Document structure tree including markup
  • Miniature page preview images (Thumbnails)
  • Spider (web capture) information

Features and configuration on file level

  • Read encrypted input files
  • Encrypt and set access authorization for the output file
  • Process memory-resident files
  • Automatic removal of obsolete objects stemming from previous changes to the file
  • Set minimum PDF version of the output file
  • Linearize output file for fast web view

Listing and parameter extraction features

  • List fonts and their properties
  • List and extract images and their properties
  • Extract number of pages
  • Error code

Compliance

  • ISO 32000-1 (PDF 1.7)

Supported formats

Input formats

  • PDF

Output formats

  • PDF

Areas of use - customized PDF compression

Web & Mail

Web-based applications demand short response times. Potential customers lose interest when online publications and documents are slow to load. Same as poorly compressed PDF documents make emails unnecessarily large and can slow down communications or prevent the exchange of documents by email altogether. Small and linearized PDF documents reduce response times significantly and improve the outgoing mail processes significantly.

Pre-press stage

The priorities in the pre-press stage focus on correct reproduction and color quantity reduction during printing. Hence, all colors can be converted to CMYK for instance.

Other areas of use

  • Web publishing platform
  • As an optimization step after assembling documents from a heterogeneous source
  • Conversion of colors to standardize corporate color space standards

Archive

Archiving requirements can vary. For instance, alternative images may be required in one case but not in another. Redundant or unnecessary data should not be archived in either scenario. The 3‑Heights™ PDF Optimizer component offers selective optimization options to enable precisely these kinds of configuration variations.

Checklist how to optimize PDF documents

  • Identify target application area
    for example:
    • Web (small size, short download, fast display)
    • Printing (correct fonts, right color scheme, suitable resolution)
    • Archiving (embedded fonts, color profiles, metadata)
    • Scanned documents (lossless image compression for ocr enginge)
    • Special requirements

  • Apply adequate optimization settings
    for example:
  • Color space
  • Resolution
  • Fonts
  • Color/monochrome compression
  • Bi-tonal compression
  • Redundant objects
  • Article thread
  • Form field
  • Alternate images
  • Meta data
  • Page piece info
  • Document structure tree
  • Thumbnails
  • Spider

#Sample 1 - Optimize a PDF document for archiving

This sample shows how to reduce the file size while not losing any data important for archiving.
This is done by

  • optimizing images, but using only lossless compression
  • optimizing fonts, but not un-embedding any fonts
  • optimizing resources, removing redundancy, but keeping metadata

How to optimize a PDF document for archiving

Archiving can have varying requisites, such as: Minimize the file size, maximize the reproducibility of the document, minimize the access time to find a specific archived document, etc.

The most common way for archiving a PDF is the PDF/A format. PDF/A requires fonts to be embedded, metadata to be included and prohibits certain features, like LZW or JPEG2000 compression or alternate images. The 3-Heights™ PDF Optimizer API does not create PDF/A compliant output but can be used, e.g., to reduce the file size prior to converting to PDF/A. In a further processing step, you can then use the 3-Heights™ PDF to PDF/A Converter to convert the optimized document to PDF/A.

using System;
using Pdftools.Pdf;
using Pdftools.PdfOptimize;

namespace PdfOptimizerSamples
{
    class OptimizeForArchivingSample
    {
        /// <summary>
        /// Optimizes a given PDF document for archiving and saves the result to a new file
        /// </summary>
        /// <param name="inFilePath">Path to input PDF document</param>
        /// <param name="outFilePath">Path to resulting PDF document</param>
        public static void OptimizeForArchiving(string inFilePath, string outFilePath)
        {
            // 1. Create new PDF optimizer
            using (Optimizer opt = new Optimizer())
            {
                // 2. Open input document
                if (!opt.Open(inFilePath, String.Empty))
                {
                    Console.WriteLine("Unable to open input file (" + opt.ErrorCode + ")");
                    return;
                }

                // 3. Configure the optimizer for archiving

                // Image optimization (use only lossless compression)
                // - WARNING: LZW and JPEG 2000 are supported in PDF/A-2 but not in PDF/A-1
                opt.BitonalCompressions = PDFComprAttempt.eComprAttemptGroup4 | PDFComprAttempt.eComprAttemptJBIG2 | PDFComprAttempt.eComprAttemptFlate | PDFComprAttempt.eComprAttemptLZW;
                opt.ContinuousCompressions = PDFComprAttempt.eComprAttemptJPEG2000 | PDFComprAttempt.eComprAttemptFlate;
                opt.IndexedCompressions = PDFComprAttempt.eComprAttemptFlate | PDFComprAttempt.eComprAttemptLZW;
                opt.ImageQuality = 100;
                opt.ReduceColorComplexity = true;
                opt.ClipImages = true;

                // Font optimization
                // - Archiving requires fonts to be embedded
                opt.RemoveStandardFonts = false;
                opt.MergeEmbeddedFonts = true;
                opt.SubsetFonts = true;
                opt.ConvertToCFF = true;

                // Resource optimization
                // - Archiving requires metadata to be included, do not strip them
                // - For archiving, alternate images are not allowed
                opt.OptimizeResources = true;
                opt.RemoveRedundantObjects = true;
                opt.Strip = PDFStripType.eStripAlternates;

                // 4. Optimize document according to optimizer settings and save as new document
                if (!opt.SaveAs(outFilePath, String.Empty, String.Empty, PDFPermission.ePermNoEncryption))
                {
                    Console.WriteLine("Error while optimizing (" + opt.ErrorCode + ")");
                    return;
                }

                // 5. Close the currently open input files
                opt.Close();
            }
        }
    }
}
pdfoptimize -fb 2,3,6,7 -fc 2,8 -fi 2,3 -q 100 -rc -oc -m -s -cff -od -or -si in.pdf out.pdf
# -fb: try flate (2), LZW (3), CCIT Group 4 (6) and JBIG2 (7) compressions for bi-tonal images
# -fc: try flate (2) and JPEG2000 (8) compressions for color and grayscale images (NOTE: JPEG 2000 is supported in PDF/A-2 but not in PDF/A-1)
# -fi: try flate (2) and lzw (3) compressions for indexed images
# -q: only apply lossless compression when compressing with JPEG2000
# -rc: reduce color complexity of images
# -oc: clip images

# -m: merge embedded font programs
# -s: subset fonts
# -cff: compress Type1 fonts (convert to CFF)

# -od: optimize resources
# -or: remove redundant objects
# -si: strip alternate images (variant representations of the base image)

What you get with 3-Heights™ PDF Optimizer

  • Numerous features for customized optimization
  • Predefined optimization profiles for different applications
  • Efficient compression, thanks to powerful algorithms and methods
  • Designed for individual processing and mass processing
  • Powerful component with high stability, quality and scalability

☎ +41 43 411 44 51   ✉ pdfsales(at)pdf-tools.com

Quality assurance
Clean, lean and compliant PDF documents without loss of quality and information.

Storage space
Relevant saving of storage space in the corresponding application area - especially for long-term digital archive storage.

Time
Efficient processing through the 3-Heights™ architecture. Fast document display, short download times and optimal searchability thanks to elimination of redundant data and application-oriented PDF optimization.

Logo inbro

Automate compression of PDF documents in professional digital printing software

Processes have become faster and more reliable, and also enabled inbro to leverage their investment in cloud computing to be able to scale their business cheaply and effectively. Due to the implementation of PDF Optimization the permanent infrastructure could even be reduced by one managed machine.

Logo Fineprint

“Proofs to Perfection” with the 3-Heights™ PDF Optimizer and Command Line Suite

File processing and file transmission without a loss in quality have been substantially improved through integration of the PDF Tools products in the document management workflow.

PDF Expert blog - PDF document's color space - rich black vs true black

Replacing rich black by true black in PDF documents

When it comes to printing then all colors in a PDF document are transformed to the native color space of the printing device. If, e.g. a text uses a black RGB color then it is transformed to an equivalent CMYK value which contains contributions from all four color channels...


PDF Expert Blog - embedded fonts and PDF mass printing application

The problem with embedded fonts in PDF mass printing applications

PDF is more and more finding its way into mass printing applications. However, PDF spool files often ask too much from a print engine resulting in aborts or, even worse, incomplete prints which may not be noticed. What is special about PDF mass printing...


Special - Optimization

Optimization - reduce your files to the max

Archival processes therefore need to be kept under control, with a focus on optimization. And one area that can be improved is data optimization itself.

Get more information about the benefits of document optimization and compression.