public class PdfFile extends Object
| Modifier and Type | Field and Description |
|---|---|
protected File |
directory
The directory where the file can be found (if the PDF was passed as a file).
|
protected String |
filename
The original filename.
|
protected Permissions |
permissions
The file permissions
|
protected String |
rawContent
Raw content string
|
protected PdfReader |
reader
The PdfReader object.
|
| Constructor and Description |
|---|
PdfFile(byte[] file)
Constructs a PdfFile object.
|
PdfFile(File file)
Constructs a PdfFile object.
|
| Modifier and Type | Method and Description |
|---|---|
File |
getDirectory() |
String |
getFilename()
Getter for the filename
|
PdfReader |
getPdfReader()
Getter for iText's PdfReader object.
|
String |
getRawContent() |
protected void |
readFile(InputStream fis,
boolean checkPass)
Does the actual reading of the file into PdfReader and PDFFile.
|
void |
setDirectory(File directory) |
void |
setFilename(String filename) |
protected File directory
protected String filename
protected PdfReader reader
protected Permissions permissions
protected String rawContent
public PdfFile(File file) throws IOException, DocumentException
file - the File to readIOExceptionDocumentExceptionpublic PdfFile(byte[] file)
throws IOException,
DocumentException
file - the byte[] to readIOExceptionDocumentExceptionprotected void readFile(InputStream fis, boolean checkPass) throws IOException, DocumentException
IOExceptionDocumentExceptionpublic PdfReader getPdfReader()
public String getFilename()
public File getDirectory()
public String getRawContent()
public void setDirectory(File directory)
public void setFilename(String filename)
Copyright © 2016. All Rights Reserved.