module Pdfops:sig
..end
Parsing PDF Graphics Streams
type
t =
| |
Op_w of |
| |
Op_J of |
| |
Op_j of |
| |
Op_M of |
| |
Op_d of |
| |
Op_ri of |
| |
Op_i of |
| |
Op_gs of |
| |
Op_q |
| |
Op_Q |
| |
Op_cm of |
| |
Op_m of |
| |
Op_l of |
| |
Op_c of |
| |
Op_v of |
| |
Op_y of |
| |
Op_h |
| |
Op_re of |
| |
Op_S |
| |
Op_s |
| |
Op_f |
| |
Op_F |
| |
Op_f' |
| |
Op_B |
| |
Op_B' |
| |
Op_b |
| |
Op_b' |
| |
Op_n |
| |
Op_W |
| |
Op_W' |
| |
Op_BT |
| |
Op_ET |
| |
Op_Tc of |
| |
Op_Tw of |
| |
Op_Tz of |
| |
Op_TL of |
| |
Op_Tf of |
| |
Op_Tr of |
| |
Op_Ts of |
| |
Op_Td of |
| |
Op_TD of |
| |
Op_Tm of |
| |
Op_T' |
| |
Op_Tj of |
| |
Op_TJ of |
| |
Op_' of |
| |
Op_'' of |
| |
Op_d0 of |
| |
Op_d1 of |
| |
Op_CS of |
| |
Op_cs of |
| |
Op_SC of |
| |
Op_sc of |
| |
Op_SCN of |
| |
Op_scn of |
| |
Op_SCNName of |
| |
Op_scnName of |
| |
Op_G of |
| |
Op_g of |
| |
Op_RG of |
| |
Op_rg of |
| |
Op_K of |
| |
Op_k of |
| |
Op_sh of |
| |
InlineImage of |
| |
Op_Do of |
| |
Op_MP of |
| |
Op_DP of |
| |
Op_BMC of |
| |
Op_BDC of |
| |
Op_EMC |
| |
Op_BX |
| |
Op_EX |
| |
Op_Unknown of |
A flat representation of the PDF graphics stream operators. Where the operator contains the asterisk character (not allowable in OCaml syntax), a prime is substituted.
val parse_single_stream : Pdf.t -> Pdf.pdfobject -> Pdfio.bytes -> t list
Parse a single byte streams to an operator list given a document and resource dictionary.
val parse_stream : Pdf.t -> Pdf.pdfobject -> Pdfio.bytes list -> t list
Parse a list of byte streams to an operator list given a document and resource dictionary.
val concat_bytess : Pdfio.bytes list -> Pdfio.bytes
Concatenate a list of bytes, padding with whitespace between.
val parse_operators : Pdf.t -> Pdf.pdfobject -> Pdf.pdfobject list -> t list
Given a pdf document, resource dictionary and list of streams representing the graphics content (PDF allows a single page's graphics content to be split over several streams), return a list of operators. Raises PDFError on bad content.
val stream_of_ops : t list -> Pdf.pdfobject
Flatten a list of operators to an uncompressed PDF stream.
val string_of_op : t -> string
Make a string of a single operator (for debug purposes).
val string_of_ops : t list -> string
Same as string_of_op
, but of several operators (for debug purposes).
val components : Pdf.t -> Pdf.pdfobject -> Pdf.pdfobject -> int
Given a pdf, a resources dictionary and a colourspace dictionary, give the number of bytes per pixel in the stored image data.
val debug : bool Stdlib.ref
When this reference is set, some debug information is printed to Standard Output.