Modules§
Macros§
Structs§
- Bookmark
- CalGray
- CalRGB
- Destination
- Dictionary
- Dictionary object.
- Document
- A PDF document.
- Encryption
State - HTML
Output - Incremental
Document - Lab
- Media
Box - Object
Stream - Path
- Permissions
- Plain
Text Output - Reader
- SVGOutput
- Separation
- Space
- Stream
- Stream object Warning - all streams must be indirect objects, while the stream dictionary may be a direct object
- Toc
- Write
Adapter
Enums§
- Alternate
Color Space - Color
Space - Encoding
- Encryption
Version - Error
- Object
- Basic PDF object types defined in an enum.
- Outline
- Output
Error - PathOp
- String
Format - String objects can be written in two formats.
Traits§
Functions§
- decode_
text_ string - Decodes a text string. Depending on the BOM at the start of the string, a different encoding is chosen. All encodings specified in PDF2.0 are supported (PDFDocEncoding, UTF-16BE, and UTF-8).
- encode_
utf8 - Encodes the given
str
to UTF-8. This method of encoding text strings is first specified in PDF2.0 and reader support is still lacking (notably, Adobe Acrobat Reader doesn’t support it at the time of writing). Thus, using it is NOT RECOMMENDED. - encode_
utf16_ be - Encodes the given
str
to UTF-16BE. The recommended way to encode text strings, as it supports all of unicode and all major PDF readers support it. - extract_
text - Extract the text from a pdf at
path
and return aString
with the results - extract_
text_ by_ pages - Extract the text from a pdf at
path
and return aVec<String>
with the results separately by page - extract_
text_ by_ pages_ encrypted - extract_
text_ encrypted - extract_
text_ from_ mem - extract_
text_ from_ mem_ by_ pages - extract_
text_ from_ mem_ by_ pages_ encrypted - extract_
text_ from_ mem_ encrypted - output_
doc - Parse a given document and output it to
output
- output_
doc_ encrypted - output_
doc_ page - print_
metadata - text_
string - Creates a text string. If the input only contains ASCII characters, the string is encoded in PDFDocEncoding, otherwise in UTF-16BE.