com.lowagie.rups.model

Class PdfFile

public class PdfFile extends Object

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
protected Filedirectory
The directory where the file can be found (if the PDF was passed as a file).
protected Stringfilename
The original filename.
protected Permissionspermissions
The file permissions
protected PDFFilePDFFile
SUN's PDFFile object.
protected PdfReaderreader
The PdfReader object.
Constructor Summary
PdfFile(File file)
Constructs a PdfFile object.
PdfFile(byte[] file)
Constructs a PdfFile object.
Method Summary
PdfReadergetPdfReader()
Getter for iText's PdfReader object.
PDFFilegetPDFFile()
Getter for SUN's PDFFile object (for the renderer)
protected voidreadFile(RandomAccessFileOrArray pdf)
Does the actual reading of the file into PdfReader and PDFFile.
protected RandomAccessFileOrArrayworkAround()

Field Detail

directory

protected File directory
The directory where the file can be found (if the PDF was passed as a file).

filename

protected String filename
The original filename.

permissions

protected Permissions permissions
The file permissions

PDFFile

protected PDFFile PDFFile
SUN's PDFFile object.

reader

protected PdfReader reader
The PdfReader object.

Constructor Detail

PdfFile

public PdfFile(File file)
Constructs a PdfFile object.

Parameters: file the File to read

Throws: IOException DocumentException

PdfFile

public PdfFile(byte[] file)
Constructs a PdfFile object.

Parameters: file the byte[] to read

Throws: IOException DocumentException

Method Detail

getPdfReader

public PdfReader getPdfReader()
Getter for iText's PdfReader object.

Returns: a PdfReader object

getPDFFile

public PDFFile getPDFFile()
Getter for SUN's PDFFile object (for the renderer)

Returns: a PDFFile object

readFile

protected void readFile(RandomAccessFileOrArray pdf)
Does the actual reading of the file into PdfReader and PDFFile.

Parameters: pdf a Random Access File or Array

Throws: IOException DocumentException

workAround

protected RandomAccessFileOrArray workAround()