Convert PDF pages to JPG or PNG images
A PDF is fundamentally a collection of resolution-independent vectors and text fonts. An image (like JPG or PNG) is a rasterized grid of colored pixels.
To convert a PDF to an image, a rendering engine must calculate the geometry of every vector path, font glyph, and embedded shape, and plot them onto a fixed pixel grid. This intensive mathematical process is called Rasterization.
Instead of relying on a backend server, this tool uses Mozilla's PDF.js engine compiled for the browser.
It reads the raw PDF binary stream and translates the PDF operators (like drawing a curve or placing a font character) into HTML5 Canvas 2D API commands (like ctx.bezierCurveTo). Once the page is fully drawn on an invisible Canvas in memory, we export the pixel data as a DataURL to generate the final JPG or PNG file.
Because PDFs are vector-based, they have no inherent "resolution". A 1-inch box in a PDF looks perfectly crisp whether you zoom in 100% or 10,000%.
When rasterizing to an image, we must assign an artificial scale factor (often measured in DPI - Dots Per Inch). If we render the PDF at 72 DPI, the resulting image will look blurry on a modern Retina display. Our engine automatically calculates a high-resolution device pixel ratio (usually rendering at 2x or 3x scale) to ensure the exported image is incredibly crisp.
What is the process of converting vector graphics (PDF) into a grid of pixels (JPG) called?