Java Doc for PDFFile.java in  » PDF » PDF-Renderer » com » sun » pdfview » 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 » PDF Renderer » com.sun.pdfview 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.pdfview.PDFFile

PDFFile
public class PDFFile (Code)
An encapsulation of a .pdf file. The methods of this class can parse the contents of a PDF file, but those methods are hidden. Instead, the public methods of this class allow access to the pages in the PDF file. Typically, you create a new PDFFile, ask it for the number of pages, and then request one or more PDFPages.
author:
   Mike Wessler


Field Summary
 ByteBufferbuf
    
 Cachecache
    
 PDFObjectencrypt
    
 Stringeol
    
 PDFXref[]objIdx
    
 PDFObjectroot
    

Constructor Summary
public  PDFFile(ByteBuffer buf)
     get a PDFFile from a .pdf file.

Method Summary
public synchronized  PDFObjectdereference(PDFXref ref)
     Used internally to track down PDFObject references.
public  intgetNumPages()
     return the number of pages in this PDFFile.
public  OutlineNodegetOutline()
     Gets the outline tree as a tree of OutlineNode, which is a subclass of DefaultMutableTreeNode.
public  PDFPagegetPage(int pagenum)
     Get the page commands for a given page in a separate thread.
public  PDFPagegetPage(int pagenum, boolean wait)
     Get the page commands for a given page.
public  intgetPageNumber(PDFObject page)
     Gets the page number (starting from 1) of the page represented by a particular PDFObject.
public  PDFObjectgetRoot()
     get the root PDFObject of this PDFFile.
public static  booleanisDelimiter(int c)
    
public  booleanisPrintable()
     Gets whether the owner of the file has given permission to print the file.
public  booleanisSaveable()
     Gets whether the owner of the file has given permission to save a copy of the file.
public static  booleanisWhiteSpace(int c)
    
public  Rectangle2D.FloatparseRect(PDFObject obj)
     get a Rectangle2D.Float representation for a PDFObject that is an array of four Numbers.
public  voidstop(int pageNum)
    

Field Detail
buf
ByteBuffer buf(Code)
A ByteBuffer containing the file data



cache
Cache cache(Code)
a mapping of page numbers to parsed PDF commands



encrypt
PDFObject encrypt(Code)
the Encrypt PDFObject, from the trailer



eol
String eol(Code)
the end of line character



objIdx
PDFXref[] objIdx(Code)
the cross reference table mapping object numbers to locations in the PDF file



root
PDFObject root(Code)
the root PDFObject, as specified in the PDF file




Constructor Detail
PDFFile
public PDFFile(ByteBuffer buf) throws IOException(Code)
get a PDFFile from a .pdf file. The file must me a random access file at the moment. It should really be a file mapping from the nio package.

Use the getPage(...) methods to get a page from the PDF file.
Parameters:
  buf - the RandomAccessFile containing the PDF.





Method Detail
dereference
public synchronized PDFObject dereference(PDFXref ref) throws IOException(Code)
Used internally to track down PDFObject references. You should never need to call this.

Since this is the only public method for tracking down PDF objects, it is synchronized. This means that the PDFFile can only hunt down one object at a time, preventing the file's location from getting messed around.

This call stores the current buffer position before any changes are made and restores it afterwards, so callers need not know that the position has changed.




getNumPages
public int getNumPages()(Code)
return the number of pages in this PDFFile. The pages will be numbered from 1 to getNumPages(), inclusive.



getOutline
public OutlineNode getOutline() throws IOException(Code)
Gets the outline tree as a tree of OutlineNode, which is a subclass of DefaultMutableTreeNode. If there is no outline tree, this method returns null.



getPage
public PDFPage getPage(int pagenum)(Code)
Get the page commands for a given page in a separate thread.
Parameters:
  pagenum - the number of the page to get commands for



getPage
public PDFPage getPage(int pagenum, boolean wait)(Code)
Get the page commands for a given page.
Parameters:
  pagenum - the number of the page to get commands for
Parameters:
  wait - if true, do not exit until the page is complete.



getPageNumber
public int getPageNumber(PDFObject page) throws IOException(Code)
Gets the page number (starting from 1) of the page represented by a particular PDFObject. The PDFObject must be a Page dictionary or a destination description (or an action). a number between 1 and the number of pages indicating thepage number, or 0 if the PDFObject is not in the page tree.



getRoot
public PDFObject getRoot()(Code)
get the root PDFObject of this PDFFile. You generally shouldn't need this, but we've left it open in case you want to go spelunking.



isDelimiter
public static boolean isDelimiter(int c)(Code)
Is the argument a delimiter according to the PDF spec?



isPrintable
public boolean isPrintable()(Code)
Gets whether the owner of the file has given permission to print the file. true if it is okay to print the file



isSaveable
public boolean isSaveable()(Code)
Gets whether the owner of the file has given permission to save a copy of the file. true if it is okay to save the file



isWhiteSpace
public static boolean isWhiteSpace(int c)(Code)
Is the argument a white space character according to the PDF spec?



parseRect
public Rectangle2D.Float parseRect(PDFObject obj) throws IOException(Code)
get a Rectangle2D.Float representation for a PDFObject that is an array of four Numbers.
Parameters:
  obj - a PDFObject that represents an Array of exactly fourNumbers.



stop
public void stop(int pageNum)(Code)
Stop the rendering of a particular image on this page



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.