Package com.lowagie.rups.model
Class PdfFile
java.lang.Object
com.lowagie.rups.model.PdfFile
Wrapper for both iText's PdfReader (referring to a PDF file to read) and SUN's PDFFile (referring to the same PDF
file to render).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected File
The directory where the file can be found (if the PDF was passed as a file).protected String
The original filename.protected Permissions
The file permissionsprotected PdfReader
The PdfReader object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGetter for iText's PdfReader object.protected void
Does the actual reading of the file into PdfReader and PDFFile.
-
Field Details
-
directory
The directory where the file can be found (if the PDF was passed as a file). -
filename
The original filename. -
reader
The PdfReader object. -
permissions
The file permissions
-
-
Constructor Details
-
PdfFile
Constructs a PdfFile object.- Parameters:
file
- the File to read- Throws:
IOException
- thrown when an I/O operation failsDocumentException
- thrown when an error occurs with the Document
-
PdfFile
Constructs a PdfFile object.- Parameters:
file
- the byte[] to read- Throws:
IOException
- thrown when an I/O operation failsDocumentException
- thrown when an error occurs with the Document
-
-
Method Details
-
readFile
Does the actual reading of the file into PdfReader and PDFFile.- Parameters:
pdf
- a Random Access File or Array- Throws:
IOException
- thrown when an I/O operation goes wrongDocumentException
- thrown when something goes wrong with a Document
-
getPdfReader
Getter for iText's PdfReader object.- Returns:
- a PdfReader object
-