pdfSweep 2.0.5 API
iText.PdfCleanup.PdfCleanUpTool Class Reference

Represents the main mechanism for cleaning a PDF document. More...

Public Member Functions

  PdfCleanUpTool (PdfDocument pdfDocument)
  Creates a PdfCleanUpTool object. No regions for erasing are specified. Use AddCleanupLocation(PdfCleanUpLocation) method to set regions to be erased from the document. More...
 
  PdfCleanUpTool (PdfDocument pdfDocument, bool cleanRedactAnnotations)
  Creates a PdfCleanUpTool object. If cleanRedactAnnotations is true, regions to be erased are extracted from the redact annotations contained inside the given document. Those redact annotations will be removed from the resultant document. If cleanRedactAnnotations is false, then no regions for erasing are specified. In that case use AddCleanupLocation(PdfCleanUpLocation) method to set regions to be erased from the document. More...
 
  PdfCleanUpTool (PdfDocument pdfDocument, IList< PdfCleanUpLocation > cleanUpLocations)
  Creates a PdfCleanUpTool object based on the given System.Collections.IList of PdfCleanUpLocation s representing regions to be erased from the document. More...
 
virtual iText.PdfCleanup.PdfCleanUpTool  AddCleanupLocation (PdfCleanUpLocation cleanUpLocation)
 
PdfCleanUpTool  SetEventCountingMetaInfo (IMetaInfo metaInfo)
  Sets the cleanup meta info that will be passed to the EventCounter with PdfSweepEvent and can be used to determine event origin.

Parameters
metaInfo the meta info to set.
Returns
this instance
More...
 
virtual void  CleanUp ()
  Cleans the document by erasing all the areas which are either provided or extracted from redaction annotations. More...
 
bool  IsProcessAnnotations ()
  Check if page annotations will be processed Default: True More...
 
void  SetProcessAnnotations (bool processAnnotations)
  Set if page annotations will be processed Default processing behaviour: remove annotation if there is overlap with a redaction region More...
 

Static Public Attributes

static double  floatMultiplier = Math.Pow(10, 14)
  When a document with line arts is being cleaned up, there are lot of calculations with floating point numbers. More...
 
static double  arcTolerance = 0.0025
  Used as the criterion of a good approximation of rounded line joins and line caps. More...
 

Detailed Description

Represents the main mechanism for cleaning a PDF document.

Constructor & Destructor Documentation

◆ PdfCleanUpTool() [1/3]

iText.PdfCleanup.PdfCleanUpTool.PdfCleanUpTool ( PdfDocument  pdfDocument )
inline

Creates a PdfCleanUpTool object. No regions for erasing are specified. Use AddCleanupLocation(PdfCleanUpLocation) method to set regions to be erased from the document.

Parameters
pdfDocument A iText.Kernel.Pdf.PdfDocument object representing the document to which redaction applies.

◆ PdfCleanUpTool() [2/3]

iText.PdfCleanup.PdfCleanUpTool.PdfCleanUpTool ( PdfDocument  pdfDocument,
bool  cleanRedactAnnotations 
)
inline

Creates a PdfCleanUpTool object. If cleanRedactAnnotations is true, regions to be erased are extracted from the redact annotations contained inside the given document. Those redact annotations will be removed from the resultant document. If cleanRedactAnnotations is false, then no regions for erasing are specified. In that case use AddCleanupLocation(PdfCleanUpLocation) method to set regions to be erased from the document.

Parameters
pdfDocument A iText.Kernel.Pdf.PdfDocument object representing the document to which redaction applies.
cleanRedactAnnotations if true - regions to be erased are extracted from the redact annotations contained inside the given document.

◆ PdfCleanUpTool() [3/3]

iText.PdfCleanup.PdfCleanUpTool.PdfCleanUpTool ( PdfDocument  pdfDocument,
IList< PdfCleanUpLocation cleanUpLocations 
)
inline

Creates a PdfCleanUpTool object based on the given System.Collections.IList of PdfCleanUpLocation s representing regions to be erased from the document.

Parameters
cleanUpLocations list of locations to be cleaned up PdfCleanUpLocation
pdfDocument A iText.Kernel.Pdf.PdfDocument object representing the document to which redaction applies.

Member Function Documentation

◆ CleanUp()

virtual void iText.PdfCleanup.PdfCleanUpTool.CleanUp ( )
inlinevirtual

Cleans the document by erasing all the areas which are either provided or extracted from redaction annotations.

◆ IsProcessAnnotations()

bool iText.PdfCleanup.PdfCleanUpTool.IsProcessAnnotations ( )
inline

Check if page annotations will be processed Default: True

Returns
True if annotations will be processed by the PdfCleanUpTool

◆ SetEventCountingMetaInfo()

PdfCleanUpTool iText.PdfCleanup.PdfCleanUpTool.SetEventCountingMetaInfo ( IMetaInfo  metaInfo )
inline

Sets the cleanup meta info that will be passed to the EventCounter with PdfSweepEvent and can be used to determine event origin.

Parameters
metaInfo the meta info to set.
Returns
this instance

◆ SetProcessAnnotations()

void iText.PdfCleanup.PdfCleanUpTool.SetProcessAnnotations ( bool  processAnnotations )
inline

Set if page annotations will be processed Default processing behaviour: remove annotation if there is overlap with a redaction region

Parameters
processAnnotations if page annotations will be processed

Member Data Documentation

◆ arcTolerance

double iText.PdfCleanup.PdfCleanUpTool.arcTolerance = 0.0025
static

Used as the criterion of a good approximation of rounded line joins and line caps.

◆ floatMultiplier

double iText.PdfCleanup.PdfCleanUpTool.floatMultiplier = Math.Pow(10, 14)
static

When a document with line arts is being cleaned up, there are lot of calculations with floating point numbers.

When a document with line arts is being cleaned up, there are lot of calculations with floating point numbers. All of them are translated into fixed point numbers by multiplying by this coefficient. Vary it to adjust the preciseness of the calculations.