com.justformspdf.pdf
Class PDFReader

java.lang.Object
  |
  +--com.justformspdf.pdf.PDFReader

public class PDFReader
extends java.lang.Object

The PDFReader class reads an existing PDF file.

This class is responsible for reading the file bytes including header, parsing form elements and editing and rendering later on by another class.

All methods in this class are private and there is no public method available for users to call. User of this class only uses the constructor.

Here is an example showing how PDFReader should be used in reading a PDF file:

 
 FileInputStream fis = new FileInputStream("C:\\JustFormsPDF\\examples\\AddressForm32A2.pdf");                          
 PDF pdf = new PDF(new PDFReader(fis));
 
 
 FormText text = (FormText) form.getElement("Name");
 text.setValue("John K. Baker");
 
 
 pdf.render();
 pdf.writeTo(new FileOutputStream("C:\\JustFormsPDF\\examples\\AddressForm32A2_out.pdf"));
   
 


Constructor Summary
PDFReader(java.io.InputStream is)
          Read a PDF from the specified InputStream.
   

Constructor Detail

PDFReader

public PDFReader(java.io.InputStream is)
          throws java.lang.Exception
Read a PDF from the specified InputStream. The InputStream should be closed by the user.

Here is an example showing how PDFReader should be used in reading a PDF file:

 
 FileInputStream fis = new FileInputStream("C:\\JustFormsPDF\\examples\\AddressForm32A2.pdf");                          
 PDF pdf = new PDF(new PDFReader(fis));
 
 

Parameters:
is - the input stream to read from
Throws:
java.lang.Exception