sig
  val write_debug : bool Pervasives.ref
  type encryption_method =
      PDF40bit
    | PDF128bit
    | AES128bit of bool
    | AES256bit of bool
    | AES256bitISO of bool
    | AlreadyEncrypted
  type encryption = {
    encryption_method : Pdfwrite.encryption_method;
    owner_password : string;
    user_password : string;
    permissions : Pdfcrypt.permission list;
  }
  val pdf_to_output :
    ?preserve_objstm:bool ->
    ?generate_objstm:bool ->
    bool -> Pdfwrite.encryption option -> Pdf.t -> Pdfio.output -> unit
  val pdf_to_channel :
    ?preserve_objstm:bool ->
    ?generate_objstm:bool ->
    bool ->
    Pdfwrite.encryption option ->
    bool -> Pdf.t -> Pervasives.out_channel -> unit
  val pdf_to_file_options :
    ?preserve_objstm:bool ->
    ?generate_objstm:bool ->
    bool -> Pdfwrite.encryption option -> bool -> Pdf.t -> string -> unit
  val pdf_to_file : Pdf.t -> string -> unit
  val pdf_to_file_recrypting : Pdf.t -> Pdf.t -> string -> string -> unit
  val string_of_pdf : Pdf.pdfobject -> string
  val pagetree_make_explicit : (Pdf.t -> Pdf.t) Pervasives.ref
  val debug_whole_pdf : Pdf.t -> unit
end