PDF to Image Rendering – How to Do it Correctly

PDF to Image Rendering – How to Do it Correctly

Is there really an incorrect way to render PDF files? The short answer is yes! There are actually many incorrect ways to render a PDF file. Just doing a Google search on “PDF to image” yields 29,400,000 results. In reality, there are really a few hundred tools out there that create images out of PDF files, with a varying degree of success. A lot of them produce different results, and they can’t all be right.

PDF is a vast standard, encapsulating many different elements and features. Interpretations of the standard are where some of the problems in creating images from PDFs come from. Feature support is another large area that is the source of problems. Some applications will simply not render elements on the page, and not ever notify the end user that something was skipped. Others will attempt to process a feature, and it will come out wrong. They will render it anyways. You then take this incorrectly rendered image, and use it in another process, causing you all sorts of problems.

Let’s take a step back and look at why we render PDF files to images. Images are widespread and processing them is trivial. Processing images rarely results in significant variations. This makes them particularly good in certain applications.

For example, you are running a print shop, and you take in PDF files from various customers. Before you send those to print, you would like to send a confirmation to your customer for approval. Naturally, you would render the PDF file to an image, and send it back to your customer. In this case there can’t be any discrepancies between the image you are sending, and the file that comes out of the printer. In another example, printed material comes out of the press. Chances are you have a verification system that checks every page for discrepancies. In many cases, this verification system creates images out of the original PDF to compare it to the page that comes out. In this case, there can be no errors in rendering. It has to be pixel perfect.

There are also more user oriented examples of why you would need images out of PDF files. A lot of book shops have PDF copies of their books. They would like to generate thumbnails for their online stores. It’s a fairly common practice to generate thumbnails of those books using a PDF to image application and show them directly on the web store. This is, of course, just scratching the surface of use cases for PDF to image rendering.

How do you ensure that your images come out correctly every time, regardless of how you’re using the image?

  • Use the same tool that created the file in the first place to do the rendering as well.
  • Use a well-known tool that has a lot of users.
  • Make sure the tool you are using supports different features you might need – different color profiles, transparency types, fonts, etc.

A large portion of PDF files out there are created by a process involving some Adobe tool. That could be Adobe InDesign, Adobe Illustrator, Adobe Photoshop, Adobe Acrobat, etc. Additionally, Adobe Acrobat and Adobe Reader are the de-facto standard for PDF viewing. So, how do you take the Adobe tools and use them to render images for you?

We have taken the Adobe PDF Library, the same library that does PDF processing behind all of the above PDF tools, and employed it as a foundation to applications to assist PDF users. We recognized the need for PDF to image rendering, and created PDF2IMG. It’s easy to use, creates pixel perfect images, and with over 35 optional settings, is flexible enough to embed in different processes or products.

Yesterday, we released our newest version of PDF2IMG that not only uses the latest version of the Adobe PDF Library, the one behind Adobe Acrobat DC and also the current version of Adobe Reader DC, but it includes some new features we have added to make it easier to use. With it, you can create outstanding images in any one of seven different formats.

We are excited about the changes we are making to this product, and hope you’ll stay tuned for our next command line applications, PDF2Print and PDF2EPUB.

If you’d like to try the PDF2IMG application, a demo and an evaluation copy are available through our website.

Leave a Reply

Your email address will not be published.