module Cpdfcontent:sig..end
Representing page content as objects without loss.
typefpoint =float * float
type winding_rule =
| |
EvenOdd |
| |
NonZero |
type segment =
| |
Straight of |
| |
Bezier of |
type hole =
| |
Hole |
| |
Not_hole |
type closure =
| |
Closed |
| |
Open |
typesubpath =hole * closure * segment list
typepath =winding_rule * subpath list
type drawn_path = {
|
stroked : |
|
filled : |
|
path : |
}
type content =
| |
Glyph of |
| |
InlineImage of |
| |
Image of |
| |
Path of |
| |
Shading of |
| |
Clip |
type bounding_box =
| |
Quad of |
type partial =
| |
NoPartial |
| |
PartialPath of |
type tiling =
| |
Tiling |
type function_shading = {
|
funshading_domain : |
|
funshading_matrix : |
|
funshading_function : |
}
type radial_shading = {
|
radialshading_coords : |
|
radialshading_domain : |
|
radialshading_function : |
|
radialshading_extend : |
}
type axial_shading = {
|
axialshading_coords : |
|
axialshading_domain : |
|
axialshading_function : |
|
axialshading_extend : |
}
type shading_kind =
| |
FunctionShading of |
| |
AxialShading of |
| |
RadialShading of |
| |
FreeFormGouraudShading |
| |
LatticeFormGouraudShading |
| |
CoonsPatchMesh |
| |
TensorProductPatchMesh |
type shading = {
|
shading_colourspace : |
|
shading_background : |
|
shading_bbox : |
|
shading_antialias : |
|
shading_matrix : |
|
shading_extgstate : |
|
shading : |
}
type pattern =
| |
ColouredTilingPattern of |
| |
UncolouredTilingPattern of |
| |
ShadingPattern of |
type colvals =
| |
Floats of |
| |
Named of |
| |
Pattern of |
type font_data = {
|
mutable fontobj : |
|
mutable extra_metrics : |
|
mutable table : |
|
mutable text_extractor : |
}
type text_state = {
|
mutable character_spacing : |
|
mutable word_spacing : |
|
mutable horizontal_scaling : |
|
mutable leading : |
|
mutable font : |
|
mutable font_data : |
|
mutable font_cache : |
|
mutable font_size : |
|
mutable rendering_mode : |
|
mutable rise : |
|
mutable knockout : |
|
mutable t_m : |
|
mutable t_lm : |
}
type state = {
|
mutable ctm : |
|
mutable partial_path : |
|
mutable path : |
|
mutable clipping_path : |
|
mutable colourspace_stroke : |
|
mutable colourspace_non_stroke : |
|
mutable colour_stroke : |
|
mutable colour_non_stroke : |
|
mutable text_state : |
|
mutable line_width : |
|
mutable line_cap : |
|
mutable line_join : |
|
mutable miter_limit : |
|
mutable dash_pattern : |
|
mutable rendering_intent : |
|
mutable stroke_adjustment : |
|
mutable blend_mode : |
|
mutable soft_mask : |
|
mutable alpha_constant_stroke : |
|
mutable alpha_constant_non_stroke : |
|
mutable alpha_source : |
|
mutable black_point_compensation : |
|
mutable overprint_stroke : |
|
mutable overprint_non_stroke : |
|
mutable overprint_mode : |
|
mutable black_generation : |
|
mutable undercolour_removal : |
|
mutable transfer : |
|
mutable halftone : |
|
mutable flatness : |
|
mutable smoothness : |
|
mutable d0 : |
|
mutable d1 : |
|
mutable marked_content_point : |
|
mutable marked_content : |
}
type t = {
|
bounding_box : |
|
content : |
|
state : |
}
val filter : pdf:Pdf.t ->
f:(t -> bool) ->
mediabox:float * float * float * float ->
resources:Pdf.pdfobject -> ops:Pdfops.t list -> Pdfops.t listFilter objects based on a predicate on t.
val to_json : pdf:Pdf.t ->
mediabox:float * float * float * float ->
resources:Pdf.pdfobject ->
?graphics:bool ->
?text:bool -> ?images:bool -> Pdfops.t list -> Cpdfyojson.Safe.tProcess graphics operations and output result as JSON.