aboutsummaryrefslogtreecommitdiffstats
path: root/src/documentation/content/xdocs/dev/design/pdf-library.xml
blob: ba6fa01d7e00fd4e868197b6a30501c442d5e9dc (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?xml version="1.0" standalone="no"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!-- $Id$ -->
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN"
    "http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-forrest/src/core/context/resources/schema/dtd/document-v12.dtd">

<document>
  <header>
    <title>FOP Design: PDF Library</title>
    <version>$Revision$</version>
  </header>

    <body>
<section id="intro">
  <title>Introduction</title>

<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>
</section>

<section>
  <title>PDF Document</title>
<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>
</section>

<section>
  <title>Building PDF</title>
<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>

</section>
<section>
  <title>Features</title>

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

<section>
  <title>Images</title>
<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></section>

<section>
  <title>Stream Filters</title>
<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></section>

<section>
  <title>Links</title>
<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></section>

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

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

    </body>
</document>