-
Notifications
You must be signed in to change notification settings - Fork 218
Extensibility
galkahana edited this page Sep 14, 2010
·
2 revisions
The library user might want to add PDF objects implementations, or to affect how the library functions.
The way to do that is to use DocumentContext and ObjectsContext classes directly, instead of through the facade provided by PDFWriter. The DocumentContext class implements complex objects such as pages, form XObject and Images. The ObjectsContext class implements the more basic building blocks, such as dictionaries, streams and primitive objects. You can get more information on the relation between these two objects in PDFWriter Project
There are 3 main methods to extend the library:
- Implement extender interfaces, and set them on either of the DocumentContext or ObjectsContext. Extenders control the way objects that are already implemented in the library gets written. Through an extender of a DocumentContext you can add keys to dictionary objects of Pages, the Catalog, Form XObjecte etc.
- Use the DocumentContext object to get such items as the Trailer object, or the trailer info and set values on them.
- Use the ObjectsContext object to write complex objects out of simpler, more primitive objects. Good examples on how to do this can be found in the DocumentContext implementations of form XObject and image XObject writing for JPG and Tiff Objects.
To read about all functionalities of these object read The DocumentContext Object and The ObjectsContext Object
- First Steps In Creating a PDF file
- Creating PDF Pages
- Images Support
- Text Support
- Adding Content to PDF Pages
- Links
- Unicode and UnicodeString class
- PDF Embedding
- Custom input and output
- Using Form XObjects
- Forward Referencing
- JPG Images Support
- TIFF Images Support
- PNG Images support