Ir al contenido principal

raygeo.formats.pdf

Lines, a rectangle, a cubic curve and a dashed line

Lines, a rectangle, a cubic curve and a dashed line

Optional-content groups imported as separate layers

Optional-content groups imported as separate layers

A rectangle placed through a translated form XObject

A rectangle placed through a translated form XObject

Text drawn with an embedded Type0 font

Text drawn with an embedded Type0 font

Base14 text drawn with a system font substitute

Base14 text drawn with a system font substitute PDF vector import and single-image page writing.

Reads the painted path geometry of a PDF page without a rasterizer or an external PDF library. Text is converted to glyph outlines with the file's embedded fonts (or the closest system font when none is embedded); images, fills and stroke widths are ignored. The result is the centre-line geometry of every painted path, in PDF points, Y-up, in the frame of the page as it is displayed: its crop box and rotation are applied, and content outside that page box is not returned.

Optional-content groups (PDF layers) become separate geometries, form XObjects are expanded, and documents that need a password are rejected. What was skipped or cut off is reported as issues.

Sub-modules mirror the Rust layout: raygeo.formats.pdf.info reads metadata and layers, raygeo.formats.pdf.content extracts the painted geometry of a page, and raygeo.formats.pdf.writer writes single-image pages.