package camlpdf
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=0625166be89e2d29990273bcba70a5ea2747301e8b7cf4f510c8f2fbc02da7ae
doc/camlpdf/Pdfwrite/index.html
Module Pdfwrite
Writing PDF Files
val write_debug : bool refWhen set to true, various pieces of information are printed to standard output when a PDF is written. On library startup, is false.
Encryption methods
Encryption methods. The boolean for AES128bit, AES256bit and AES256BitISO indicates encryption of metadata or lack thereof. AlreadyEncrypted is used as a flag to prevent garbage collection internally by pdf_to_file_recrypting.
type encryption = {encryption_method : encryption_method;owner_password : string;user_password : string;permissions : Pdfcrypt.permission list;
}The type of an encryption with certain user permissions.
Writing to outputs, channels and files.
val pdf_to_output :
?preserve_objstm:bool ->
?generate_objstm:bool ->
?compress_objstm:bool ->
?recrypt:string option ->
encryption option ->
bool ->
Pdf.t ->
Pdfio.output ->
unitWrite a PDF document to an Pdfio.output, optionally encrypting. If ?preserve_objstm is set (default is false), object streams which were in the original file will be preserved. If ?create_objstm is set (default is false), additional new object streams will be created. To re-encrypt the file using its existing encryption, provide the user or owner password in the ?recrypt argument.
val pdf_to_channel :
?preserve_objstm:bool ->
?generate_objstm:bool ->
?compress_objstm:bool ->
?recrypt:string option ->
encryption option ->
bool ->
Pdf.t ->
out_channel ->
unitAs pdf_to_output but to an OCaml channel. If the second boolean is set, build a new /ID (don't set this for encrypted documents).
val pdf_to_file_options :
?preserve_objstm:bool ->
?generate_objstm:bool ->
?compress_objstm:bool ->
?recrypt:string option ->
encryption option ->
bool ->
Pdf.t ->
string ->
unitAs pdf_to_channel but to a named file.
val pdf_to_file : Pdf.t -> string -> unitSimple write to given file name. Equivalent to pdf_to_file_options false None true
String of a PDF object
val string_of_pdf : Pdf.pdfobject -> stringCalculate a string of a pdf object.
val string_of_pdf_including_data : Pdf.pdfobject -> stringCalculate a string of a pdf object, but include binary data too.
val debug_whole_pdf : Pdf.t -> unitFor debug, print out the PDFs objects to standard output.