1 unstable release
0.1.2 | Apr 22, 2021 |
---|---|
0.1.1 |
|
0.1.0 |
|
#28 in #pdf-file
1MB
1.5K
SLoC
llpr
llpr (low-level PDF reader) is intended to support applications which need fast access to raw PDF data streams.
usage:
-
Instantiate a
PDFDocument
withPDFDocument::new
which expects aPDFSource
. CurrentlyByteSource
andByteSliceSource
are supported which expect the PDF source to be aVec<u8>
and a&[u8]
respectively. Other sources can be used by implementing theSource
trait. -
Once you've created a
PDFDocument
thepage_contents
function will accept a page number (zero-based) and return aPageContents
object. Use thepage_count
function to determine how many pages are in the document. -
Repeatedly call the
next_object
function on thePageContents
object to retrievePdfObject
s.
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.