public class RemovePageRedaction extends Redaction
Represents a redaction that removes a page (slide, worksheet, etc.) from a document.
Learn more
The following example demonstrates how to remove the last page of the document.
try (Redactor redactor = new Redactor("C:\\test.pdf"))
{
redactor.apply(new RemovePageRedaction(PageSeekOrigin.END, 0, 1));
redactor.save()
}
| Constructor and Description |
|---|
RemovePageRedaction(PageSeekOrigin origin,
int index,
int count)
Initializes a new instance of RemovePageRedaction class.
|
| Modifier and Type | Method and Description |
|---|---|
RedactorLogEntry |
applyTo(DocumentFormatInstance formatInstance)
Applies the redaction to a given format instance.
|
int |
getCount()
Gets the count of pages to remove.
|
int |
getIndex()
Gets start position index (0-based).
|
PageSeekOrigin |
getOrigin()
Gets seek reference position, the beginning or the end of a document.
|
getDescriptionpublic RemovePageRedaction(PageSeekOrigin origin, int index, int count)
Initializes a new instance of RemovePageRedaction class.
origin - Seek reference position, the beginning or the end of a documentindex - Start position index (0-based)count - Count of pages to removepublic RedactorLogEntry applyTo(DocumentFormatInstance formatInstance)
Applies the redaction to a given format instance.
public final int getCount()
Gets the count of pages to remove.
public final int getIndex()
Gets start position index (0-based).
public final PageSeekOrigin getOrigin()
Gets seek reference position, the beginning or the end of a document.
Copyright © 2025. All rights reserved.