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.

svg.xml 4.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <?xml version="1.0" encoding="UTF-8"?>
  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 Development: SVG Issues</title>
  21. <version>$Revision$</version>
  22. </header>
  23. <body>
  24. <p>See also <link href="../trunk/graphics.html#svg">SVG User Documentation</link> for more information.</p>
  25. <section>
  26. <title>Examples</title>
  27. <p>
  28. These examples illustrate a number of issues relating to conversion
  29. to PDF:
  30. </p>
  31. <table>
  32. <caption>SVG to PDF examples</caption>
  33. <tr>
  34. <th/>
  35. <th>svg file</th>
  36. <th>png file</th>
  37. <th>pdf result</th>
  38. </tr>
  39. <tr>
  40. <td>images</td>
  41. <td><link href="svg/images.svg">images.svg</link></td>
  42. <td><link href="svg/images.png">images.png</link></td>
  43. <td><link href="svg/images.pdf">images.pdf</link></td>
  44. </tr>
  45. <tr>
  46. <td>svg linking</td>
  47. <td><link href="svg/link.svg">link.svg</link></td>
  48. <td><link href="svg/link.png">link.png</link></td>
  49. <td><link href="svg/link.pdf">link.pdf</link></td>
  50. </tr>
  51. <tr>
  52. <td>gradients and patterns</td>
  53. <td><link href="svg/paints.svg">paints.svg</link></td>
  54. <td><link href="svg/paints.png">paints.png</link></td>
  55. <td><link href="svg/paints.pdf">paints.pdf</link></td>
  56. </tr>
  57. <tr>
  58. <td>various text and effects on text</td>
  59. <td><link href="svg/text.svg">text.svg</link></td>
  60. <td><link href="svg/text.png">text.png</link></td>
  61. <td><link href="svg/text.pdf">text.pdf</link></td>
  62. </tr>
  63. <tr>
  64. <td>transparent objects</td>
  65. <td><link href="svg/transparency.svg">transparency.svg</link></td>
  66. <td><link href="svg/transparency.png">transparency.png</link></td>
  67. <td><link href="svg/transparency.pdf">transparency.pdf</link></td>
  68. </tr>
  69. </table>
  70. <p>
  71. As can be seen most of the specific issues are handled.
  72. </p>
  73. <note>
  74. You will need Acrobat 5.0 to see transparency.
  75. </note>
  76. <table>
  77. <caption>XSL:FO to PDF examples</caption>
  78. <tr>
  79. <th/>
  80. <th>fo file</th>
  81. <th>pdf result</th>
  82. </tr>
  83. <tr>
  84. <td>embedding svg</td>
  85. <td><link href="fo/embedding.fo">embedding.fo</link></td>
  86. <td><link href="fo/embedding.fo.pdf">embedding.fo.pdf</link></td>
  87. </tr>
  88. </table>
  89. </section>
  90. <section>
  91. <title>Developer Notes</title>
  92. <p>
  93. For most output formats in FOP the SVG is simply drawn into
  94. an image with Batik.
  95. For PDF there are a set of classes to handle drawing the
  96. <link href="http://xml.apache.org/batik/architecture.html">GVT (Graphic Vector Toolkit)</link>
  97. into PDF markup.
  98. </p>
  99. <section>
  100. <title>Classes</title>
  101. <p>
  102. These are the relevant classes, found in the package org.apache.fop.svg :
  103. </p>
  104. <ul>
  105. <li><em>PDFGraphics2D</em>
  106. <br/>
  107. used for drawing onto a Graphics2D into an existing pdf document, used
  108. internally to draw the svg.
  109. </li>
  110. <li><em>PDFDocumentGraphics2D</em>
  111. <br/>
  112. used to create a pdf document and inherits from PDFGraphics2D to do the
  113. rest of the drawing. Used by the transcoder to create a standalone pdf
  114. document from an svg. Can be used independantly the same as any Graphics2D.
  115. </li>
  116. <li><em>PDFTranscoder</em>
  117. <br/>
  118. used by Batik to transcode an svg document into a standalone pdf, via
  119. PDFDocumentGraphics2D.
  120. </li>
  121. </ul>
  122. </section>
  123. <section>
  124. <title>Ideas</title>
  125. <p>
  126. Batik can convert ttf to svg font.
  127. This svg font could be converted into a pdf stroked font
  128. (type 3 font).
  129. </p>
  130. </section>
  131. </section>
  132. </body>
  133. </document>