PDF documents are primarily vector files—composed of mathematical cubic Bézier curves, coordinate matrices, and font glyph instructions that scale infinitely. When you convert a PDF page to JPG, PNG, or send it to a printer, it must undergo rasterization.
Vector Mathematics vs Raster Grids
In a PDF, a diagonal line is stored not as pixels, but as coordinates: 100 100 m 400 400 l S (move to 100,100; draw line to 400,400; stroke path). Rasterization evaluates these equations against a target DPI grid (e.g. 300 DPI) and maps mathematical boundaries onto discrete RGB pixel values.
The 4-Stage Rasterization Pipeline
- Parsing & Page Tree Traversal: Evaluates transformation matrices, clipping paths, and color spaces.
- Tessellation: Decomposes complex vector curves into rasterizable scanline spans and trapezoids.
- Font Scan Conversion: Executes font bytecode hinting to ensure glyph stems align with pixel boundaries.
- Color Blending & Alpha Compositing: Computes transparency blend modes (e.g. Multiply, Screen) and outputs a contiguous RGB/RGBA pixmap buffer.
Frequently Asked Questions
Can a rasterized PDF page be converted back into editable vector text?
Not directly without Optical Character Recognition (OCR), because rasterization bakes vector typography into a flat pixel matrix.