Package com.lowagie.rups.model
Class PdfFile
- java.lang.Object
-
- com.lowagie.rups.model.PdfFile
-
public class PdfFile extends java.lang.ObjectWrapper 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
Fields Modifier and Type Field Description protected java.io.FiledirectoryThe directory where the file can be found (if the PDF was passed as a file).protected java.lang.StringfilenameThe original filename.protected com.sun.pdfview.PDFFilePDFFileSUN's PDFFile object.protected PermissionspermissionsThe file permissionsprotected PdfReaderreaderThe PdfReader object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.sun.pdfview.PDFFilegetPDFFile()Getter for SUN's PDFFile object (for the renderer)PdfReadergetPdfReader()Getter for iText's PdfReader object.protected voidreadFile(RandomAccessFileOrArray pdf)Does the actual reading of the file into PdfReader and PDFFile.protected RandomAccessFileOrArrayworkAround()
-
-
-
Field Detail
-
directory
protected java.io.File directory
The directory where the file can be found (if the PDF was passed as a file).
-
filename
protected java.lang.String filename
The original filename.
-
reader
protected PdfReader reader
The PdfReader object.
-
PDFFile
protected com.sun.pdfview.PDFFile PDFFile
SUN's PDFFile object.
-
permissions
protected Permissions permissions
The file permissions
-
-
Constructor Detail
-
PdfFile
public PdfFile(java.io.File file) throws java.io.IOException, DocumentExceptionConstructs a PdfFile object.- Parameters:
file- the File to read- Throws:
java.io.IOExceptionDocumentException
-
PdfFile
public PdfFile(byte[] file) throws java.io.IOException, DocumentExceptionConstructs a PdfFile object.- Parameters:
file- the byte[] to read- Throws:
java.io.IOExceptionDocumentException
-
-
Method Detail
-
readFile
protected void readFile(RandomAccessFileOrArray pdf) throws java.io.IOException, DocumentException
Does the actual reading of the file into PdfReader and PDFFile.- Parameters:
pdf- a Random Access File or Array- Throws:
java.io.IOExceptionDocumentException
-
workAround
protected RandomAccessFileOrArray workAround() throws DocumentException, java.io.IOException
- Throws:
DocumentExceptionjava.io.IOException
-
getPdfReader
public PdfReader getPdfReader()
Getter for iText's PdfReader object.- Returns:
- a PdfReader object
-
getPDFFile
public com.sun.pdfview.PDFFile getPDFFile()
Getter for SUN's PDFFile object (for the renderer)- Returns:
- a PDFFile object
-
-