llpr
llpr (low-level PDF reader) is intended to support applications which need fast access to raw PDF data streams.
usage:
-
Instantiate a
PDFDocumentwithPDFDocument::newwhich expects aPDFSource. CurrentlyByteSourceandByteSliceSourceare supported which expect the PDF source to be aVec<u8>and a&[u8]respectively. Other sources can be used by implementing theSourcetrait. -
Once you've created a
PDFDocumentthepage_contentsfunction will accept a page number (zero-based) and return aPageContentsobject. Use thepage_countfunction to determine how many pages are in the document. -
Repeatedly call the
next_objectfunction on thePageContentsobject to retrievePdfObjects.
A PDFObject is really low-level. See pdf_types.rs for a definition.
This crate may be useful for building up higher level abstractions but can't
help you if you're looking for something that can easily extract text or images
from a PDF file.