aboutsummaryrefslogtreecommitdiffstats
path: root/src/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/org')
-rw-r--r--src/org/apache/fop/svg/PDFTextElementBridge.java3
-rw-r--r--src/org/apache/fop/svg/PDFTextPainter.java4
-rw-r--r--src/org/apache/fop/svg/PDFTranscoder.java4
3 files changed, 7 insertions, 4 deletions
diff --git a/src/org/apache/fop/svg/PDFTextElementBridge.java b/src/org/apache/fop/svg/PDFTextElementBridge.java
index a4a3759ed..7d9aee21d 100644
--- a/src/org/apache/fop/svg/PDFTextElementBridge.java
+++ b/src/org/apache/fop/svg/PDFTextElementBridge.java
@@ -68,6 +68,9 @@ public class PDFTextElementBridge extends SVGTextElementBridge {
if(((int)fs) != fs) {
return false;
}
+ if(fs > 36) {
+ return false;
+ }
Element nodeElement;
for (Node n = element.getFirstChild();
diff --git a/src/org/apache/fop/svg/PDFTextPainter.java b/src/org/apache/fop/svg/PDFTextPainter.java
index dce7d5231..692986bcd 100644
--- a/src/org/apache/fop/svg/PDFTextPainter.java
+++ b/src/org/apache/fop/svg/PDFTextPainter.java
@@ -74,12 +74,16 @@ public class PDFTextPainter implements TextPainter {
(Vector)aci.getAttribute(GVTAttributedCharacterIterator.TextAttribute.GVT_FONT_FAMILIES);
Paint forg = (Paint)aci.getAttribute(TextAttribute.FOREGROUND);
Float size = (Float)aci.getAttribute(TextAttribute.SIZE);
+ if(size == null) {
+ return;
+ }
Stroke stroke =
(Stroke)aci.getAttribute(GVTAttributedCharacterIterator.TextAttribute.STROKE);
Float xpos =
(Float)aci.getAttribute(GVTAttributedCharacterIterator.TextAttribute.X);
Float ypos =
(Float)aci.getAttribute(GVTAttributedCharacterIterator.TextAttribute.Y);
+System.out.println("data:" + size + ":" + forg + ":" + xpos + ":" + ypos);
Float posture = (Float)aci.getAttribute(TextAttribute.POSTURE);
Float taWeight = (Float)aci.getAttribute(TextAttribute.WEIGHT);
diff --git a/src/org/apache/fop/svg/PDFTranscoder.java b/src/org/apache/fop/svg/PDFTranscoder.java
index dea3df6d2..54ba7a3d3 100644
--- a/src/org/apache/fop/svg/PDFTranscoder.java
+++ b/src/org/apache/fop/svg/PDFTranscoder.java
@@ -95,9 +95,6 @@ import org.w3c.dom.svg.SVGAElement;
import org.w3c.dom.svg.SVGDocument;
import org.w3c.dom.svg.SVGSVGElement;
-// <!> FIXME : Those import clauses will change with new design
-import org.apache.batik.gvt.renderer.StaticRendererFactory;
-
/**
* This class enables to transcode an input to a pdf document.
*
@@ -177,7 +174,6 @@ public class PDFTranscoder extends XMLAbstractTranscoder {
// build the GVT tree
GVTBuilder builder = new GVTBuilder();
- ImageRendererFactory rendFactory = new StaticRendererFactory();
BridgeContext ctx = new BridgeContext(userAgent);
TextPainter textPainter = null;
textPainter = new StrokingTextPainter();