public class Document extends Object implements Closeable
Represents document properties
| Constructor and Description |
|---|
Document(InputStream stream)
Initializes new instance of
Document class. |
Document(InputStream stream,
String password)
Initializes new instance of
Document class. |
| Modifier and Type | Method and Description |
|---|---|
void |
addImageToDocument(String dataDir,
String jpgFileName,
int pageNumber,
int imageQuality)
Change image quality and add image to document
|
void |
close() |
InputStream |
createStream()
Creates Document input stream
|
void |
generatePreview(PreviewOptions previewOptions)
Generates document pages preview.
|
IDocumentInfo |
getDocumentInfo()
Gets information about document - document type and size, pages count
etc.
|
String |
getName()
Document name
|
String |
getPassword()
Document password
|
int |
getProcessPages()
Document pages
|
Byte |
getRotation()
Document Rotation
|
long |
getStreamSize()
Document size
|
void |
setCache(ICache value) |
void |
setName(String value)
Document name
|
void |
setPassword(String value) |
void |
setProcessPages(int value)
Document pages
|
void |
setRotation(Byte value)
Document Rotation
|
public Document(InputStream stream)
Initializes new instance of Document class.
stream - The document stream.public Document(InputStream stream, String password)
Initializes new instance of Document class.
stream - The document stream.password - The document password.public void addImageToDocument(String dataDir, String jpgFileName, int pageNumber, int imageQuality)
Change image quality and add image to document
dataDir - Specify the path to the input PDF filejpgFileName - The path to the JPG filepageNumber - Page where the image will be insertedimageQuality - Set image quality from 1 to 100, "1" - is the smallest resolution "100" - is the largestpublic void close()
close in interface Closeableclose in interface AutoCloseablepublic final InputStream createStream() throws IOException
Creates Document input stream
IOExceptionpublic final void generatePreview(PreviewOptions previewOptions)
Generates document pages preview.
previewOptions - The document preview optionspublic final IDocumentInfo getDocumentInfo() throws IOException
Gets information about document - document type and size, pages count etc.
IOExceptionpublic final String getName()
Document name
public final String getPassword()
Document password
public final int getProcessPages()
Document pages
public final Byte getRotation()
Document Rotation
public final long getStreamSize()
Document size
public final void setCache(ICache value)
public final void setName(String value)
Document name
value - public final void setPassword(String value)
public final void setProcessPages(int value)
Document pages
value - public final void setRotation(Byte value)
Document Rotation
value - Copyright © 2024. All rights reserved.