module Cpdfmetadata:sig..end
Metadata
type encoding =
| |
Raw |
| |
UTF8 |
| |
Stripped |
Possible output encodings for some function. Raw does no processing at
all - the PDF string is output as-is. UTF8 converts loslessly to UTF8.
Stripped extracts the unicode codepoints and returns only those which
correspond to 7 bit ASCII.
val encode_output : encoding -> string -> stringEncode a string using a given encoding.
val copy_id : bool -> Pdf.t -> Pdf.t -> Pdf.tcopy_id keepversion copyfrom copyto copies the ID, if any, from
copyfrom to copyto. If keepversion is true, the PDF version of copyto
won't be affected.
val set_pdf_info : ?xmp_also:bool ->
?xmp_just_set:bool -> string * Pdf.pdfobject * int -> Pdf.t -> Pdf.tset_pdf_info (key, value, version) sets the entry key in the /Info directory, updating
the PDF minor version to version.
val get_xmp_info : Pdf.t -> string -> stringGet XMP information for a given key.
val set_viewer_preference : string * Pdf.pdfobject * int -> Pdf.t -> Pdf.tset_pdf_info (key, value, version) sets the entry key in the
/ViewerPreferences directory, updating the PDF minor version to version.
val set_page_layout : Pdf.t -> string -> Pdf.tSet the page layout to the given name (sans slash) e.g SinglePage
val set_page_mode : Pdf.t -> string -> Pdf.tSet the page mode to the given name (sans slash) e.g UseThumbs
val set_non_full_screen_page_mode : Pdf.t -> string -> Pdf.tSet the non full screen page mode to the given name (sans slash) e.g UseThumbs
val set_open_action : Pdf.t -> ?dest:string -> bool -> int -> Pdf.tSet the open action. If the boolean is true, /Fit will be used, otherwise /XYZ
val set_version : int -> Pdf.t -> unitSet the PDF version number
val get_info_utf8 : Pdf.t -> string -> stringGiven a PDF, returns a function which can lookup a given dictionary entry from the /Info dictionary, returning it as a UTF8 string
val output_info : ?json:(string * Cpdfyojson.Safe.t) list Stdlib.ref ->
encoding -> Pdfunits.t -> Pdf.t -> unitOutput to standard output general information about a PDF.
val output_xmp_info : ?json:(string * Cpdfyojson.Safe.t) list Stdlib.ref ->
encoding -> Pdfunits.t -> Pdf.t -> unitOutput to standard output information from any XMP metadata stream in a PDF.
val create_metadata : Pdf.t -> Pdf.tCreate XMP metadata from scratch
val set_metadata : bool -> string -> Pdf.t -> Pdf.tset_metadata keepversion filename pdf sets the XML metadata of a PDF to the contents of filename. If keepversion is true, the PDF version will not be altered.
val set_metadata_from_bytes : bool -> Pdfio.bytes -> Pdf.t -> Pdf.tThe same, but the content comes from bytes.
val remove_metadata : Pdf.t -> Pdf.tRemove the metadata from a file
val get_metadata : Pdf.t -> Pdfio.bytes optionExtract metadata to a Pdfio.bytes
val print_metadata : Pdf.t -> unitPrint metadate to stdout
val set_metadata_date : Pdf.t -> string -> Pdf.tSet the metadata date
val expand_date : string -> stringExpands the date "now" to the date now. Leaves any other string alone.