aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/svg
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2002-03-08 11:00:20 +0000
committerKeiron Liddle <keiron@apache.org>2002-03-08 11:00:20 +0000
commitf0e488222854d0a838094936b6929e083c15230b (patch)
treefff738398f5429595b48cfe4270ab9cd91ef98f6 /src/org/apache/fop/svg
parent8f766d59eba2df9b0600b2fad11b098cb589a64f (diff)
downloadxmlgraphics-fop-f0e488222854d0a838094936b6929e083c15230b.tar.gz
xmlgraphics-fop-f0e488222854d0a838094936b6929e083c15230b.zip
renders images and ifo to pdf doc
added xml reader for external graphics git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194696 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/svg')
-rw-r--r--src/org/apache/fop/svg/PDFGraphics2D.java1
-rw-r--r--src/org/apache/fop/svg/SVGElementMapping.java19
2 files changed, 13 insertions, 7 deletions
diff --git a/src/org/apache/fop/svg/PDFGraphics2D.java b/src/org/apache/fop/svg/PDFGraphics2D.java
index 21e9598e2..2dd96ad34 100644
--- a/src/org/apache/fop/svg/PDFGraphics2D.java
+++ b/src/org/apache/fop/svg/PDFGraphics2D.java
@@ -104,6 +104,7 @@ public class PDFGraphics2D extends AbstractGraphics2D {
currentYPosition = ypos;
currentXPosition = xpos;
fontState = fs;
+ graphicsState = new PDFState();
}
protected PDFGraphics2D(boolean textAsShapes) {
diff --git a/src/org/apache/fop/svg/SVGElementMapping.java b/src/org/apache/fop/svg/SVGElementMapping.java
index c4e4a19c0..785f66080 100644
--- a/src/org/apache/fop/svg/SVGElementMapping.java
+++ b/src/org/apache/fop/svg/SVGElementMapping.java
@@ -16,10 +16,11 @@ import org.apache.fop.apps.Driver;
import org.apache.batik.util.XMLResourceDescriptor;
import org.apache.batik.dom.svg.SVGDOMImplementation;
+import org.w3c.dom.DOMImplementation;
public class SVGElementMapping implements ElementMapping {
-
private static HashMap foObjs = null;
+ private static boolean batik = true;
private static synchronized void setupSVG() {
if (foObjs == null) {
@@ -36,12 +37,16 @@ public class SVGElementMapping implements ElementMapping {
}
public void addToBuilder(FOTreeBuilder builder) {
- try {
- setupSVG();
- String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;
- builder.addMapping(svgNS, foObjs);
- } catch (Throwable t) {
- // if the classes are not available
+ if(batik) {
+ try {
+ setupSVG();
+ String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;
+ builder.addMapping(svgNS, foObjs);
+ } catch (Throwable t) {
+ // if the classes are not available
+ // the DISPLAY is not checked
+ batik = false;
+ }
}
}