sig
  exception PDFReadError of string
  exception PDFSemanticError of string
  val pdf_of_input : ?upw:string -> Io.input -> Pdf.pdfdoc
  val pdf_of_input_lazy : ?upw:string -> Io.input -> Pdf.pdfdoc
  val pdf_of_channel : ?upw:string -> Pervasives.in_channel -> Pdf.pdfdoc
  val pdf_of_channel_lazy :
    ?upw:string -> Pervasives.in_channel -> Pdf.pdfdoc
  val pdf_of_file : ?upw:string -> string -> Pdf.pdfdoc
  val read_header : Io.input -> int * int
  type lexeme =
      LexNull
    | LexBool of bool
    | LexInt of int
    | LexReal of float
    | LexString of string
    | LexName of string
    | LexLeftSquare
    | LexRightSquare
    | LexLeftDict
    | LexRightDict
    | LexStream of Pdf.stream
    | LexEndStream
    | LexObj
    | LexEndObj
    | LexR
    | LexComment
    | StopLexing
    | LexNone
  val lex_stream_data : Io.input -> int -> bool -> Pdfread.lexeme
  val getuntil_white_or_delimiter : Io.input -> char list
  val lex_number : Io.input -> Pdfread.lexeme
  val lex_string : Io.input -> Pdfread.lexeme
  val lex_hexstring : Io.input -> Pdfread.lexeme
  val lex_comment : Io.input -> Pdfread.lexeme
  val lex_dictionary : Io.input -> Pdfread.lexeme list
  val parse : ?objnum':int -> Pdfread.lexeme list -> int * Pdf.pdfobject
  val dropwhite : Io.input -> unit
  val print_lexeme : Pdfread.lexeme -> unit
  val string_of_lexeme : Pdfread.lexeme -> string
end