FreeHEP API
Version current

org.freehep.graphicsio.pdf
Class PDFWriter

java.lang.Object
  extended byorg.freehep.graphicsio.pdf.PDF
      extended byorg.freehep.graphicsio.pdf.PDFWriter
All Implemented Interfaces:
PDFConstants

public class PDFWriter
extends PDF
implements PDFConstants

This class creates a PDF file/stream. It keeps track of all logical PDF objects in the PDF file, will create a cross-reference table and do some error checking while writing the file.

This class takes care of wrapping both PDFStreams and PDFDictionaries into PDFObjects.

Version:
$Id: PDFWriter.java,v 1.3 2005/03/11 05:29:10 duns Exp $
Author:
Mark Donszelmann
Source Code:
PDFWriter.java

Field Summary
 
Fields inherited from class org.freehep.graphicsio.pdf.PDF
out
 
Fields inherited from interface org.freehep.graphicsio.pdf.PDFConstants
CAP_BUTT, CAP_ROUND, CAP_SQUARE, dateFormat, EOL, JOIN_BEVEL, JOIN_MITTER, JOIN_ROUND, MODE_CLIP, MODE_FILL, MODE_FILL_CLIP, MODE_FILL_STROKE, MODE_FILL_STROKE_CLIP, MODE_INVISIBLE, MODE_STROKE, MODE_STROKE_CLIP
 
Constructor Summary
PDFWriter(OutputStream out)
           
PDFWriter(OutputStream writer, String version)
           
 
Method Summary
 void close()
           
 void close(PDFCatalog catalog)
           
 void close(PDFDictionary dictionary)
           
 void close(PDFDocInfo info)
           
 void close(PDFObject object)
           
 void close(PDFOutline outline)
           
 void close(PDFOutlineList list)
           
 void close(PDFPage page)
           
 void close(PDFPageTree tree)
           
 void close(PDFStream stream)
           
 void close(PDFViewerPreferences prefs)
           
 void close(String catalogName, String docInfoName)
           
 void comment(String comment)
           
 void object(String name, int number)
           
 void object(String name, Object[] objs)
           
 PDFCatalog openCatalog(String name, String pageTree)
           
 PDFDictionary openDictionary(String name)
           
 PDFDocInfo openDocInfo(String name)
           
 PDFObject openObject(String name)
           
 PDFOutline openOutline(String name, String title, String parent, String prev, String next)
           
 PDFOutlineList openOutlineList(String name, String first, String next)
           
 PDFPage openPage(String name, String parent)
           
 PDFPageTree openPageTree(String name, String parent)
           
 PDFStream openStream(String name)
           
 PDFStream openStream(String name, String[] encode)
           
 PDFViewerPreferences openViewerPreferences(String name)
           
 
Methods inherited from class org.freehep.graphicsio.pdf.PDF
name, ref, ref, setXRef, startxref, trailer, xref
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PDFWriter

public PDFWriter(OutputStream out)
          throws IOException

PDFWriter

public PDFWriter(OutputStream writer,
                 String version)
          throws IOException
Method Detail

close

public void close(String catalogName,
                  String docInfoName)
           throws IOException
Throws:
IOException

comment

public void comment(String comment)
             throws IOException
Throws:
IOException

object

public void object(String name,
                   Object[] objs)
            throws IOException
Throws:
IOException

object

public void object(String name,
                   int number)
            throws IOException
Throws:
IOException

openObject

public PDFObject openObject(String name)
                     throws IOException
Throws:
IOException

close

public void close(PDFObject object)
           throws IOException
Throws:
IOException

openDictionary

public PDFDictionary openDictionary(String name)
                             throws IOException
Throws:
IOException

close

public void close(PDFDictionary dictionary)
           throws IOException
Throws:
IOException

openStream

public PDFStream openStream(String name)
                     throws IOException
Throws:
IOException

openStream

public PDFStream openStream(String name,
                            String[] encode)
                     throws IOException
Throws:
IOException

close

public void close(PDFStream stream)
           throws IOException
Throws:
IOException

close

public void close()
           throws IOException
Throws:
IOException

openDocInfo

public PDFDocInfo openDocInfo(String name)
                       throws IOException
Throws:
IOException

close

public void close(PDFDocInfo info)
           throws IOException
Throws:
IOException

openCatalog

public PDFCatalog openCatalog(String name,
                              String pageTree)
                       throws IOException
Throws:
IOException

close

public void close(PDFCatalog catalog)
           throws IOException
Throws:
IOException

openPageTree

public PDFPageTree openPageTree(String name,
                                String parent)
                         throws IOException
Throws:
IOException

close

public void close(PDFPageTree tree)
           throws IOException
Throws:
IOException

openPage

public PDFPage openPage(String name,
                        String parent)
                 throws IOException
Throws:
IOException

close

public void close(PDFPage page)
           throws IOException
Throws:
IOException

openViewerPreferences

public PDFViewerPreferences openViewerPreferences(String name)
                                           throws IOException
Throws:
IOException

close

public void close(PDFViewerPreferences prefs)
           throws IOException
Throws:
IOException

openOutlineList

public PDFOutlineList openOutlineList(String name,
                                      String first,
                                      String next)
                               throws IOException
Throws:
IOException

close

public void close(PDFOutlineList list)
           throws IOException
Throws:
IOException

openOutline

public PDFOutline openOutline(String name,
                              String title,
                              String parent,
                              String prev,
                              String next)
                       throws IOException
Throws:
IOException

close

public void close(PDFOutline outline)
           throws IOException
Throws:
IOException

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.