You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pdf-library.xml 3.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. -->
  16. <!-- $Id$ -->
  17. <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.3//EN" "http://forrest.apache.org/dtd/document-v13.dtd">
  18. <document>
  19. <header>
  20. <title>Apache™ FOP Design: PDF Library</title>
  21. <version>$Revision$</version>
  22. </header>
  23. <body>
  24. <section id="intro">
  25. <title>Introduction</title>
  26. <p>The PDF Library is an independant package of classes in Apache™ FOP. These class
  27. provide a simple way to construct documents and add the contents. The
  28. classes are found in <code>org.apache.fop.pdf.*</code>.</p>
  29. </section>
  30. <section>
  31. <title>PDF Document</title>
  32. <p>This is where most of the document is created and put together.</p>
  33. <p>It sets up the header, trailer and resources. Each page is made and added to the document.
  34. There are a number of methods that can be used to create/add certain PDF objects to the document.</p>
  35. </section>
  36. <section>
  37. <title>Building PDF</title>
  38. <p>The PDF Document is built by creating a page for each page in the Area Tree.</p>
  39. <p> This page then has all the contents added.
  40. The page is then added to the document and available objects can be written to the output stream.</p>
  41. <p>The contents of the page are things such as text, lines, images etc.
  42. The PDFRenderer inserts the text directly into a pdf stream.
  43. The text consists of markup to set fonts, set text position and add text.</p>
  44. <p>Most of the simple pdf markup is inserted directly into a pdf stream.
  45. Other more complex objects or commonly used objects are added through java classes.
  46. Some pdf objects such as an image consists of two parts.</p>
  47. <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.
  48. </p><p>The java objects that represent a pdf object implement a method that returns the markup for inserting into a stream.
  49. The method is: byte[] toPDF().</p>
  50. </section>
  51. <section>
  52. <title>Features</title>
  53. <section>
  54. <title>Fonts</title>
  55. <p>Support for embedding fonts and using the default Acrobat fonts.
  56. </p></section>
  57. <section>
  58. <title>Images</title>
  59. <p>Images can be inserted into a page. The image can either be inserted as a pixel map or directly insert a jpeg image.
  60. </p></section>
  61. <section>
  62. <title>Stream Filters</title>
  63. <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.
  64. </p></section>
  65. <section>
  66. <title>Links</title>
  67. <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.
  68. </p></section>
  69. <section>
  70. <title>Patterns</title>
  71. <p>The fill and stroke of graphical objects can be set with a colour, pattern or gradient.
  72. </p></section>
  73. <p>The are a number of other features for handling pdf markup relevent to creating PDF files for FOP.</p>
  74. </section>
  75. </body>
  76. </document>