Module Pdfcodec


module Pdfcodec: sig .. end
Encoding and Decoding PDF Streams


Currently supported:
exception Couldn'tDecodeStream of string
There was bad data.
exception DecodeNotSupported of string
PdfCaml doesn't support this encoding or its predictor.
val decode_pdfstream : Pdf.pdfdoc -> Pdf.pdfobject -> unit
Given a document and stream, decode. The pdf document is updated with the decoded stream. May return either of the exceptions above.
val decode_pdfstream_onestage : Pdf.pdfdoc -> Pdf.pdfobject -> unit
Given a document and stream decode just one stage. May return either of the exceptions above.
val decode_pdfstream_until_unknown : Pdf.pdfdoc -> Pdf.pdfobject -> unit
Given a document and stream decode until there's an unknown decoder. May return Couldn'tDecodeStream.

type encoding =
| ASCIIHex
| ASCII85
| RunLength
| Flate
Supported encodings.
val encode_pdfstream : Pdf.pdfdoc -> encoding -> Pdf.pdfobject -> unit
Encode a PDF stream with an encoding.