Why Convert PDF Files to Image?
Images are non-editable, pixelate, are larger and non-searchable. So why would you want to convert PDF files to images?
The answer is that you might not want to display your file with PDF display tools. You might want to display the content in a browser (one increasingly popular solution to this is our PDF to HTML5 converter). Or you might want to use an image of the PDF file as a thumbnail.
These two use cases require different size images. So one of the things we needed to consider with PDF2Image was, how big to make the output?
There has to be a balancing act when choosing the size of the image output. If it is too large, more memory will be used and the conversion will take longer. Therefore our default mode is to convert the image to the size of a PDF file. This is what our example conversion does. But some people might want a larger image, which will have more detail and allow you to zoom in and retain the quality. Therefore we also have an option to convert pages to hi res images. For files with high quality images, the time and memory increase might be worth the trade-off. You can read more about this in our previous article on PDF to image conversion in Java.
More information about how we overcame the problem of retaining image quality can be found in our article about PDF to image quality. If you have read this you will know that the PDF file format often uses vector graphics, and converting to bitmap can result in a loss of quality. This is because a line cannot be half a pixel wide, it can only be on or off. We have different solutions to this problem depending on the use case. Each comes with a compromise. For example scaling up the image output will give a higher quality result, but will use more time and memory.
So there are a range of possible factors to consider when converting PDF to image. Our library comes with extensive documentation to enable you to choose the most appropriate solution.
Now you know all about converting PDF files to images, and in my next post I will be showing you how to make better use of the images inside PDF files…
Latest posts by Bethan Palmer (see all)
- 3 questions raised by Dan Lyons’ ‘Disrupted’ - August 9, 2017
- 6 Things To Read On Your Summer Holiday - August 2, 2017
- The 4 tools we chose to give our customers better service in 2017 - July 27, 2017
- How we use Basecamp to manage and communicate - July 18, 2017
- How we have used close.io to improve our sales operation - July 13, 2017