PDF Tech

Introducing PDF Optimizer for Foxit PDF SDK

by Conor Smith | December 18, 2019

PDF Optimizer is Foxit’s flagship compression technology that can massively reduce the size of your PDF files. Also available in Foxit PhantomPDF, the functionality has been ported and is now available for integration with Foxit PDF SDK for Windows, Mac & Linux platforms. You are now able to reduce your archive size, compress your files for optimized data transfer and give your customers more options on how to handle their document size. This article introduces you to the addon and the advantages PDF optimization can offer you and your document management efforts.

 

Why would I use PDF Optimizer?

When a PDF is not optimized it can take a long time to download or open. This frustrates the end user, puts unnecessary load on your servers if you host your own files and quickly fills up document hosting space you have available. This can result in IT managers having to carry out an increased number of hardware upgrades to meet the processing demands of large files, and needing to buy more server space – whether on the Cloud or physical. Optimizing your PDF files enables a smoother experience for your end user as it makes opening, downloading and uploading documents a seamless process, and can save you money and time.

Simplify your PDF Development Journey

 

PDF Optimization: The process

Take a look at the different ways in which PDF optimization enhances your PDFs:

Image compression

Often, one of the most effective ways to optimize a PDF is through compressing or downsampling images. Images take up a large amount of space when compared to text in a PDF, and reducing this size ensures you can retain high quality pictures while also reducing file size. Although you might get some quality loss as part of the compression, the benefit of reducing file size is worth it in most cases. You can also choose the amount of quality reduction you want, giving you more control over the final look and feel of a PDF. When compressing images over the span of a PDF archive, you can save a lot of space. Downsampling images to a given resolution using JBIG2 and JPEG2000 compression modes for color, gray or monochrome images are the best way to do this.

 

PDF Cleanup

Discarding unused objects in a PDF is another important step in optimizing PDF. This includes, but is limited to, the following:

  • Flattening forms and related actions
  • Removing unnecessary JavaScript
  • Removing embedded page thumbnails
  • Removing invalid bookmarks
  • Removing links
  • Removing embedded print settings
  • Removing external cross references
  • Removal of ICC profiles
  • Flate compression (encode non-encoded streams)

Using these different actions can give your users a better experience of the PDF as it will have less broken elements. Many times when a user clicks on, for example, a bookmark that no longer works it can be frustrating and result in poor user experience. So not only does removing these unused objects speed up your PDF load times, it improves your customers’ journey too.

 

Discard user data

PDFs often contain lots of user data that might no longer be required, already processed or redundant for your system. This data contributes to the size of your PDF and so is deadweight that is no longer required. When that is the case and the goal is to archive the file without user data, PDF optimization includes some of the following actions:

  • Deleting comments
  • Multimedia information
  • Document metadata
  • Document attachments

If you wish, you may also remove form data and flatten form fields if these are no longer important to the finished document. Every little helps!

 

Unembedding fonts and removing duplicate fonts

PDF software embeds fonts into the file. Although not always the case, Font embedding is helpful to ensure that your PDF will appear the same on all devices that access it in most cases. However, these embedded fonts increase file size. PDF Optimizer allows you to specify only those fonts you want to embed and ensures that unnecessary fonts become non-embedded.

Fonts can also be duplicated in a PDF. Removing these duplicate fonts ensures a smaller file size, a less amount of objects and a more efficient PDF experience for your users.

 

PDF Optimizer is new to Foxit PDF SDK. Some of the features listed above are fully functional in the addon, however, we are working hard on improving this feature and have lots of upgrades planned in the following year to give you the most amount of functionality we can. If you want to know more about PDF Optimizer or have a specific requirement to implement compression in your application get in touch with the Foxit team below.