PdfFileSanitization
PdfFileSanitization class
Represents sanitization and recovery API. Use it if you can’t create/open documents in any other way.
public sealed class PdfFileSanitization : SaveableFacade
Constructors
Properties
Name | Description |
---|
Document { get; } | Gets the document facade is working on. |
Log { get; } | After file has Saved you can check what was done with file. |
UseRebuildXrefAndTrailer { get; set; } | Allows to generate new xref and trailer for document. |
UseTrimBottom { get; set; } | Allows to remove data after pdf data |
UseTrimTop { get; set; } | Allows to remove data before pdf data. |
Methods
Name | Description |
---|
override BindPdf(Document) | Initializes the facade. |
override BindPdf(Stream) | Binds a Pdf stream for Sanitize. |
override BindPdf(string) | Binds a Pdf file for Sanitize. |
override Close() | Closes the facade. |
Dispose() | Disposes the facade. |
RebuildXrefAndTrailer() | Removes old xref with trailer and creates a new xref with trailer. |
Recover() | Recovers document. Use properties to customize. |
override Save(Stream) | Saves the result PDF to stream. |
override Save(string) | Saves the result PDF to file. |
TrimBottom() | Removes data after last %%EOF. |
TrimTop() | Removes data before %PDF. |
See Also