Page
Library
Module
Module type
Parameter
Class
Class type
Source
PdfcodecEncoding and Decoding PDF Streams
Currently supported:
val encode_pdfstream :
Pdf.t ->
encoding ->
?predictor:predictor ->
?predictor_columns:int ->
Pdf.pdfobject ->
unitEncode a PDF stream with an encoding. The only predictor supported is PNGUp.
val decode_pdfstream : Pdf.t -> Pdf.pdfobject -> unitGiven a document and stream, decode. The pdf document is updated with the decoded stream. May raise either of the exceptions above.
val decode_pdfstream_onestage : Pdf.t -> Pdf.pdfobject -> unitGiven a document and stream decode just one stage. May raise either of the exceptions above.
val decode_pdfstream_until_unknown : Pdf.t -> Pdf.pdfobject -> unitGiven a document and stream decode until there's an unknown decoder. May raise Couldn'tDecodeStream.
val decode_from_input : Pdfio.input -> Pdf.pdfobject -> Pdfio.bytes optionGiven a Pdfio.input with pointer at the first byte and an inline image stream dictionary, decode the first decoder and its predictor. Return the data, or None if this decoder isn't supported but the data pointer has been left in the right place. The exceptions above can both be raised, in the case of bad data or a completely unknown encoding.
val flate_level : int refSetting this changes globally the FlateDecode compression level. Default 6.
val encode_flate : Pdfio.bytes -> Pdfio.bytesEncode data in FlateDecode.
val decode_flate : Pdfio.bytes -> Pdfio.bytesDecode data in FlateDecode.
val debug : bool refSetting this boolean prints some debug information.