How PDF Page Overlay and Font Embedding Execute
Adding text to a PDF requires embedding font metrics and writing drawing commands to the page's content stream. The compiler parses target page coordinates, registers a standard font (like Helvetica), and appends vector drawing commands. This overlays page numbers in the specified position (e.g. bottom-right) without affecting existing text layers, running locally in browser memory.