From: William Victor Mote Date: Wed, 26 Mar 2003 22:36:33 +0000 (+0000) Subject: Restore content of dev/faq.xml that was erroneously deleted. Normalize the contents... X-Git-Tag: Root_Temp_KnuthStylePageBreaking~1729 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=67e43e0cc4ff1dc7702738eb1593820fd43a10f0;p=xmlgraphics-fop.git Restore content of dev/faq.xml that was erroneously deleted. Normalize the contents of svg.xml & dev/svg.xml to remove duplication, and make a first pass at getting the user & developer content into the right document. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196144 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/documentation/content/xdocs/dev/faq.xml b/src/documentation/content/xdocs/dev/faq.xml index 844aa14bd..1a6e11518 100644 --- a/src/documentation/content/xdocs/dev/faq.xml +++ b/src/documentation/content/xdocs/dev/faq.xml @@ -3,6 +3,21 @@ "http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-forrest/src/resources/schema/dtd/faq-v11.dtd"> + + General Questions + + How can I contribute? + +

There are many ways that you can help:

+
    +
  • You can help us implement missing features that are needed in order to comply with the standard. See the Standards Compliance for more details.
  • +
  • You can help us address bug reports. See bugzilla for more information.
  • +
  • You can help support our user base by answering questions on the fop-user mailing list.
  • +
  • You can help us document FOP better.
  • +
+
+
+
Documentation diff --git a/src/documentation/content/xdocs/dev/svg.xml b/src/documentation/content/xdocs/dev/svg.xml index cc83bee3e..1af49d90c 100644 --- a/src/documentation/content/xdocs/dev/svg.xml +++ b/src/documentation/content/xdocs/dev/svg.xml @@ -4,62 +4,10 @@
- SVG in FOP + SVG Developer Issues
-
- Introduction -

-FOP uses the SVG library from -Batik to handle SVG. -This format can be handled as an fo:instream-foreign-object -or in a separate file referenced with fo:external-graphic. -Either way the SVG document will be read in and converted into a -DOM in Batik. This DOM will then be used by the renderer to -create the graphical image. -

-

-The AWT and Print renderers simply use batik to draw the SVG into a graphic. -

-

-In the case of the PDF renderer there is a PDFGraphics2D class that Batik uses -to render the image into. This class converts the drawing instructions into -PDF markup which is placed into the current PDF document. -

-
-
- Converting SVG to a PDF Document -

-It is possible to convert a standalone SVG document directly -into a simple page PDF document. -This is possible through the use of Batik's transcoder mechanism.
-java org.apache.batik.apps.rasterizer.Main -m application/pdf document.svg -
-This will output the svg document as "document.pdf" containing -a PDF rendering of the SVG file. -

-

-It is also possible to specify the width and/or height -of the PDF document on the command line with -w and -h or if -you are using the transcoder api you can use the transcoding hints. -

-

-Currently the SVG image is drawn at the SVG document size and -simply scaled in PDF to the new size. So the result may not be -the best possible. For example if you have any images or effects -it will draw them at the original resolution of the svg document. -When this is viewed in the pdf it will have an incorrect resolution -for the size of the pdf. -

-

-The size of the pdf file will also remain the same regardless of -what size the page is. -

-

-For more information see Batik -for how transcoders work. -

-
+

See also SVG User Documentation for more information.

Examples

@@ -124,71 +72,6 @@ You will need Acrobat 5.0 to see transparency. embedding.fo.pdf -

-
- Important Notes -

-The svg is inserted into PDF by using PDF commands to draw and fill -lines and curves. This means that the graphical objects created with -this remain as vector graphics. -

-

-There are a number of SVG things that cannot be converted directly into -PDF. Parts of the graphic such as effects and images are inserted -into the PDF as a raster graphic. The resolution of this graphic may not -be ideal depending on the FOP dpi (72dpi) and the scaling for that graphic. -

-

-Another important note is that text may be converted and drawn as a -set of shapes by batik. -If possible it will use normal PDF text when inserting text. It does -this by checking if the text can be drawn normally and the font is -supported. This example svg text.svg / -text.pdf -shows how various types and effects with text are handled. -

-

-If the text cannot be drawn normally then it uses shapes. -This means that a typical character will have about 10 curves -(each curve consists of at least 20 characters). -This can make the pdf files large and when the pdf is viewed the -viewer does not normally draw those fine curves very well (turning on -Smooth Line Art in the Acrobat preferences will fix this). -If the text is inserted into the PDF using the inbuilt text commands -for PDF it will use a single character. -

-
-
- Known Problems -
    -
  • -soft mask transparency is combined with white so that it looks better -on pdf 1.3 viewers but this causes the soft mask to be slightly lighter -or darker on pdf 1.4 viewers -
  • -
  • -there is some problem with a gradient inside a pattern causing a pdf -error when viewed in acrobat 5 -
  • -
  • -text is not always handled correctly, it may select the wrong font -especially if characters have multiple fonts in the font list -
  • -
  • -more pdf text handling could be implemented -It could draw the string using the attributed character iterator -to handle tspans and other simple changes of text. -
  • -
  • -JPEG images are not inserted directly into the pdf document -This area has not been implemented yet since the appropriate -method in batik is static -
  • -
  • -Uniform transparency for images and other svg elements that are converted -into a raster graphic are not drawn properly in PDF. The image is opaque. -
  • -
Developer Notes diff --git a/src/documentation/content/xdocs/svg.xml b/src/documentation/content/xdocs/svg.xml index 346e297b4..e3e01b677 100644 --- a/src/documentation/content/xdocs/svg.xml +++ b/src/documentation/content/xdocs/svg.xml @@ -6,15 +6,12 @@
- SVG - Embedding SVG in FOP + Using SVG with FOP
-
- SVG in FOP -
+
Introduction

FOP uses the SVG library from Batik to handle SVG. @@ -33,7 +30,7 @@ PDF markup which is placed into the current PDF document.

-
+
Converting SVG to a PDF Document

It is possible to convert a standalone SVG document directly into a simple page PDF document. @@ -58,8 +55,8 @@ how transcoders work.

-
- Important Notes +
+ Placing SVG Graphics into PDF

The svg is inserted into PDF by using PDF commands to draw and fill lines and curves. This means that the graphical objects created with @@ -70,11 +67,24 @@ There are a number of SVG things that cannot be converted directly into PDF. Parts of the graphic such as effects, patterns and images are inserted into the PDF as a raster graphic. The resolution of this graphic may not be ideal depending on the FOP dpi (72dpi) and the scaling for that graphic. -This needs to be improved. +This needs to be improved.

+

+Currently transparency is not supported in PDF so many svg images that +contain effects or graphics with transparent areas will not be displayed +correctly.

+
+
+ Placing SVG Text into PDF +

If possible, Batik will use normal PDF text when inserting text. It does +this by checking if the text can be drawn normally and the font is +supported. This example svg text.svg / +text.pdf +shows how various types and effects with text are handled. +Note that tspan and outlined text are not yet implemented.

-Another important note is that text is converted and drawn as a -set of shapes by batik. This means that a typical character will +Otherwise, text is converted and drawn as a set of shapes by batik, using the stroking text painter. +This means that a typical character will have about 10 curves (each curve consists of at least 20 characters). This can make the pdf files large and when the pdf is viewed the viewer does not normally draw those fine curves very well (turning on @@ -97,40 +107,40 @@ this workaround. The fonts available are the standard pdf fonts and any fonts that you have embedded using FOP. The font sizes will be rounded to an integer value. In future this will be improved.

-

-Currently transparency is not supported in PDF so many svg images that -contain effects or graphics with transparent areas will not be displayed -correctly. -

-
- Classes -

-These are the relevant classes, found in the package org.apache.fop.svg : -

+
+ Known Problems
    -
  • PDFGraphics2D -
    -used for drawing onto a Graphics2D into an existing pdf document, used -internally to draw the svg. +
  • +soft mask transparency is combined with white so that it looks better +on pdf 1.3 viewers but this causes the soft mask to be slightly lighter +or darker on pdf 1.4 viewers
  • -
  • PDFDocumentGraphics2D -
    -used to create a pdf document and inherits from PDFGraphics2D to do the -rest of the drawing. Used by the transcoder to create a standalone pdf -document from an svg. Can be used independantly the same as any Graphics2D. +
  • +there is some problem with a gradient inside a pattern causing a pdf +error when viewed in acrobat 5
  • -
  • PDFTranscoder -
    -used by Batik to transcode an svg document into a standalone pdf, via -PDFDocumentGraphics2D. +
  • +text is not always handled correctly, it may select the wrong font +especially if characters have multiple fonts in the font list +
  • +
  • +more pdf text handling could be implemented +It could draw the string using the attributed character iterator +to handle tspans and other simple changes of text. +
  • +
  • +JPEG images are not inserted directly into the pdf document +This area has not been implemented yet since the appropriate +method in batik is static +
  • +
  • +Uniform transparency for images and other svg elements that are converted +into a raster graphic are not drawn properly in PDF. The image is opaque.
- -
- -
+