PdfFileSanitization

PdfFileSanitization class

Represents sanitization and recovery API.
Use it if you can’t create/open documents in any other way.

The PdfFileSanitization type exposes the following members:

Constructors

NameDescription
PdfFileSanitization()Initializes a new instance of the PdfFileSanitization class

Properties

NameDescription
documentGets the document facade is working on.
logAfter file has Saved you can check what was done with file.
use_trim_topAllows to remove data before pdf data.
use_trim_bottomAllows to remove data after pdf data
use_rebuild_xref_and_trailerAllows to generate new xref and trailer for document.

Methods

NameDescription
bind_pdf(input_file)Binds a Pdf file for Sanitize.
bind_pdf(input_stream)Binds a Pdf stream for Sanitize.
bind_pdf(src_doc)Initializes the facade.
save(output_file)Saves the result PDF to file.
save(output_stream)Saves the result PDF to stream.
close()Closes the facade.
recover()Recovers document.
Use properties to customize.
trim_top()Removes data before %PDF.
trim_bottom()Removes data after last %%EOF.
rebuild_xref_and_trailer()Removes old xref with trailer and creates a new xref with trailer.

See Also