public class PdfContent extends Content
Learn more:
Modifier and Type | Method and Description |
---|---|
void |
decrypt()
Decrypts the content.
|
protected void |
dispose(boolean disposing)
Releases all resources used by the
PdfContent |
void |
encrypt(String password)
Encrypts the document using the same password as user password and owner password.
|
void |
encrypt(String userPassword,
String ownerPassword,
int permissions,
int cryptoAlgorithm)
Encrypts the content.
|
PdfAttachmentCollection |
getAttachments()
Gets the collection of all attachments of this
. |
int |
getPageMarginType()
Gets pdf page margins to be used during watermark adding.
|
PdfPageCollection |
getPages()
Gets the collection of all pages of this
. |
void |
rasterize(int horizontalResolution,
int verticalResolution,
int imageFormat)
Converts all content pages into images.
|
void |
setPageMarginType(int value)
Sets pdf page margins to be used during watermark adding.
|
findImages, findImages, search, search
public final PdfPageCollection getPages()
PdfContent
.PdfContent
.public final PdfAttachmentCollection getAttachments()
PdfContent
.PdfContent
.public final int getPageMarginType()
This property works only when
is true. If Watermark.getConsiderParentMargins()
is false,
when pdf CropBox is used as watermarking area.
Watermark.getConsiderParentMargins()
The default value is
.PdfPageMarginType.TrimBox
public final void setPageMarginType(int value)
This property works only when
is set to true. If Watermark.getConsiderParentMargins()
is false,
when pdf CropBox is used as watermarking area.
Watermark.getConsiderParentMargins()
The default value is
.PdfPageMarginType.TrimBox
public final void encrypt(String password)
Encrypts the document using the same password as user password and owner password.
password
- User and owner password.public final void encrypt(String userPassword, String ownerPassword, int permissions, int cryptoAlgorithm)
Encrypts the content.
userPassword
- User password.ownerPassword
- Owner password.permissions
- Content permissions.cryptoAlgorithm
- Cryptographic algorithm.public final void decrypt()
Decrypts the content.
public final void rasterize(int horizontalResolution, int verticalResolution, int imageFormat)
Converts all content pages into images.
horizontalResolution
- Horizontal image resolution.verticalResolution
- Vertical image resolution.imageFormat
- Image format.