Java Doc for PDFDocument.java in  » PDF » gnujpdf » gnu » jpdf » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » PDF » gnujpdf » gnu.jpdf 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   gnu.jpdf.PDFDocument

PDFDocument
public class PDFDocument implements Serializable(Code)

This class is the base of the PDF generator. A PDFDocument class is created for a document, and each page, object, annotation, etc is added to the document. Once complete, the document can be written to an OutputStream, and the PDF document's internal structures are kept in sync.

Note that most programmers using this package will NEVER access one of these objects directly. Most everything can be done using PDFJob and PDFGraphics, so you don't need to directly instantiate a PDFDocument

ezb - 20011115 - Wondering if the constructors should even be public. When would someone want to make one of these and manipulate it outside the context of a job and graphics object?


author:
   Peter T Mount, http://www.retep.org.uk/pdf/
author:
   Eric Z. Beard, ericzbeard@hotmail.com
author:
   $Author: ezb $
version:
   $Revision: 1.2 $, $Date: 2001/11/15 20:18:11 $


Field Summary
final public static  intFULLSCREEN
    

This page mode indicates that when the document is opened, it is displayed in full-screen-mode.

final public static  StringPDF_PAGE_MODES
    

These map the page modes just defined to the pagemodes setting of PDF.

final public static  intUSENONE
    

This page mode indicates that the document should be opened just with the page visible.

final public static  intUSEOUTLINES
    
final public static  intUSETHUMBS
    
protected  PDFObjectdefaultOutlineBorder
     This holds a PDFObject describing the default border for annotations.
protected  Vectorobjects
     This vector contains each indirect object within the document.
protected  intobjser
     This is used to allocate objects a unique serial number in the document.

Constructor Summary
public  PDFDocument()
    
public  PDFDocument(int pagemode)
    

Method Summary
public synchronized  intadd(PDFObject obj)
     This adds a top level object to the document.
public  PDFFontgetFont(String type, String font, int style)
     This returns a font of the specified type and font.
public  PDFOutlinegetOutline()
    
public  PDFInfogetPDFInfo()
    
public  PDFPagegetPage(int page)
    

This returns a specific page.

public  StringsetImageName(PDFImage img)
    
public  voidsetPDFInfo(PDFInfo info)
    
public  voidwrite(OutputStream os)
     This writes the document to an OutputStream.

Note: You can call this as many times as you wish, as long as the calls are not running at the same time.

Also, objects can be added or amended between these calls.

Also, the OutputStream is not closed, but will be flushed on completion.


Field Detail
FULLSCREEN
final public static int FULLSCREEN(Code)

This page mode indicates that when the document is opened, it is displayed in full-screen-mode. There is no menu bar, window controls nor any other window present.




PDF_PAGE_MODES
final public static String PDF_PAGE_MODES(Code)

These map the page modes just defined to the pagemodes setting of PDF.




USENONE
final public static int USENONE(Code)

This page mode indicates that the document should be opened just with the page visible. This is the default




USEOUTLINES
final public static int USEOUTLINES(Code)

This page mode indicates that the Outlines should also be displayed when the document is opened.




USETHUMBS
final public static int USETHUMBS(Code)

This page mode indicates that the Thumbnails should be visible when the document first opens.




defaultOutlineBorder
protected PDFObject defaultOutlineBorder(Code)
This holds a PDFObject describing the default border for annotations. It's only used when the document is being written.



objects
protected Vector objects(Code)
This vector contains each indirect object within the document.



objser
protected int objser(Code)
This is used to allocate objects a unique serial number in the document.




Constructor Detail
PDFDocument
public PDFDocument()(Code)

This creates a PDF document with the default pagemode




PDFDocument
public PDFDocument(int pagemode)(Code)

This creates a PDF document


Parameters:
  pagemode - an int, determines how the document will present itself tothe viewer when it first opens.




Method Detail
add
public synchronized int add(PDFObject obj)(Code)
This adds a top level object to the document.

Once added, it is allocated a unique serial number.

Note: Not all object are added directly using this method. Some objects which have Kids (in PDF sub-objects or children are called Kids) will have their own add() method, which will call this one internally.
Parameters:
  obj - The PDFObject to add to the document the unique serial number for this object.




getFont
public PDFFont getFont(String type, String font, int style)(Code)
This returns a font of the specified type and font. If the font has not been defined, it creates a new font in the PDF document, and returns it.
Parameters:
  type - PDF Font Type - usually "/Type1"
Parameters:
  font - Java font name
Parameters:
  style - java.awt.Font style (NORMAL, BOLD etc) PDFFont defining this font



getOutline
public PDFOutline getOutline()(Code)
the root outline



getPDFInfo
public PDFInfo getPDFInfo()(Code)

Get the PDFInfo object, which contains author, title, keywords, etc




getPage
public PDFPage getPage(int page)(Code)

This returns a specific page. It's used mainly when using a Serialized template file.

?? How does a serialized template file work ???
Parameters:
  page - page number to return PDFPage at that position



setImageName
public String setImageName(PDFImage img)(Code)
Sets a unique name to a PDFImage
Parameters:
  img - PDFImage to set the name of the name given to the image



setPDFInfo
public void setPDFInfo(PDFInfo info)(Code)

Set the PDFInfo object, which contains author, title, keywords, etc




write
public void write(OutputStream os) throws IOException(Code)
This writes the document to an OutputStream.

Note: You can call this as many times as you wish, as long as the calls are not running at the same time.

Also, objects can be added or amended between these calls.

Also, the OutputStream is not closed, but will be flushed on completion. It is up to the caller to close the stream.
Parameters:
  os - OutputStream to write the document to
exception:
  IOException - on error




Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.