module Pdfread: sig
.. end
Reading PDF Files
exception PDFReadError of string
exception PDFSemanticError of string
There can be many things malformed with a PDF file, in addition to the
usual difficulties concerned with file I/O. CamlPDF wraps all these up in these
two exceptions.
val pdf_of_input : string option -> Pdfio.input -> Pdf.pdfdoc
Read a PDF from an Io.input
, with an optional user password which, if
absent, is assumed to be the empty string.
val pdf_of_input_lazy : string option -> Pdfio.input -> Pdf.pdfdoc
Same, but delay loading of streams and parsing of objects.
val pdf_of_channel : string option -> Pervasives.in_channel -> Pdf.pdfdoc
Read a PDF from an OCaml channel.
val pdf_of_channel_lazy : string option -> Pervasives.in_channel -> Pdf.pdfdoc
Same, but delay loading of streams and parsing of objects.
val pdf_of_file : string option -> string -> Pdf.pdfdoc
Read a PDF from the given filename.