aboutsummaryrefslogtreecommitdiffstats
path: root/docs/design/understanding/pdf_library.xml
blob: 434cc03f8ec1ba9472720fe58a84194aa372cebf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?xml version="1.0" standalone="no"?>
<!-- Overview -->
<document> 
  <header> 
	 <title>PDF Library</title> 
	 <subtitle>All you wanted to know about the PDF Library !</subtitle> 
	 <authors> <person name="Keiron Liddle" email="keiron@aftexsw.com"/> 
	 </authors> 
  </header> 
  <body><s1 title="PDF Library"> 

<p>The PDF Library is an independant package of classes in FOP. These class
provide a simple way to construct documents and add the contents. The
classes are found in <code>org.apache.fop.pdf.*</code>.</p>




<s2 title="PDF Document">
<p>This is where most of the document is created and put together.</p>
<p>It sets up the header, trailer and resources. Each page is made and added to the document.
There are a number of methods that can be used to create/add certain PDF objects to the document.</p>
</s2>

<s2 title="Building PDF">
<p>The PDF Document is built by creating a page for each page in the Area Tree.</p>
<p> This page then has all the contents added.
 The page is then added to the document and available objects can be written to the output stream.</p>
<p>The contents of the page are things such as text, lines, images etc. 
The PDFRenderer inserts the text directly into a pdf stream. 
The text consists of markup to set fonts, set text position and add text.</p>
<p>Most of the simple pdf markup is inserted directly into a pdf stream. 
Other more complex objects or commonly used objects are added through java classes.
Some pdf objects such as an image consists of two parts.</p> 
<p>It has a separate object for the image data and another bit of markup to display the image in a certain position on the page.
</p><p>The java objects that represent a pdf object implement a method that returns the markup for inserting into a stream.
The method is: byte[] toPDF().</p>

</s2>
<s2 title="Features">



<s3 title="Fonts">
<p>Support for embedding fonts and using the default Acrobat fonts.
</p></s3>

<s3 title="Images">
<p>Images can be inserted into a page. The image can either be inserted as a pixel map or directly insert a jpeg image.
</p></s3>

<s3 title="Stream Filters">
<p>A number of filters are available to encode the pdf streams. These filters can compress the data or change it such as converting to hex.
</p></s3>

<s3 title="Links">
<p>A pdf link can be added for an area on the page. This link can then point to an external destination or a position on any page in the document.
</p></s3>

<s3 title="Patterns">
<p>The fill and stroke of graphical objects can be set with a colour, pattern or gradient.
</p></s3>


<p>The are a number of other features for handling pdf markup relevent to creating PDF files for FOP.</p>
</s2>


<s2 title="Associated Tasks">
<p>There are a large number of additional features that can be added to pdf.</p>
<p>Many of these can be handled with extensions or post processing.</p>

</s2>



  </s1> 
  </body></document>