Module Cpdfredact

module Cpdfredact: sig .. end

Redaction.


type operation = 
| Remove
| Leave
| Chop
type detection = 
| Touching
| Enclosing
| Covering of float
type spec = operation * detection option 
type link_spec = 
| LinkLeave
| LinkRemovePage
| LinkRemoveTouching
type struct_spec = 
| StructLeave
| StructRemoveInnermost
| StructRemoveContaining
| StructRemoveAll
val redact_whole_page : struct_spec:struct_spec ->
link_spec:link_spec ->
bookmark_spec:link_spec -> Pdf.t -> int list -> Pdf.t

Remove a whole page's content.

val redact : Pdf.t ->
text_spec:spec ->
image_spec:spec ->
inline_image_spec:spec ->
vector_spec:spec ->
annotation_spec:spec ->
bookmark_spec:link_spec ->
link_spec:link_spec ->
struct_spec:struct_spec ->
path_to_jbig2dec:string ->
path_to_convert:string ->
path_to_jbig2enc:string ->
paths:(float * float * float * float) list ->
invert:bool ->
show:bool ->
color:Cpdfutil.colour ->
outline:bool ->
opacity:float -> linewidth:float -> underneath:bool -> int list -> Pdf.t

Redact a PDF in the given shape in the given range.

val apply : Pdf.t ->
appearance:bool ->
text_spec:spec ->
image_spec:spec ->
inline_image_spec:spec ->
vector_spec:spec ->
annotation_spec:spec ->
bookmark_spec:link_spec ->
link_spec:link_spec ->
struct_spec:struct_spec ->
path_to_jbig2dec:string ->
path_to_convert:string ->
path_to_jbig2enc:string ->
?typ:string ->
invert:bool ->
show:bool ->
color:Cpdfutil.colour ->
outline:bool ->
opacity:float -> linewidth:float -> underneath:bool -> int list -> Pdf.t

Apply redaction annotations in a given range.

val show_bounding_boxes : fast:bool ->
paths:(float * float * float * float) option list ->
light:bool -> Pdf.t -> int list -> Pdf.t

Show bounding boxes in the given shape or, if None, the whole page in the given rage. light will use lighter colours.