aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Hennebert <vhennebert@apache.org>2014-07-28 15:29:10 +0000
committerVincent Hennebert <vhennebert@apache.org>2014-07-28 15:29:10 +0000
commit5dd78dfeeb82f1bc19f89887ecace5497114261c (patch)
treece3e2df4fb66ece02a381dab4debbed047d86a2e
parente5fd61ed972a5548675fbcc784d2693119fe548c (diff)
downloadxmlgraphics-fop-5dd78dfeeb82f1bc19f89887ecace5497114261c.tar.gz
xmlgraphics-fop-5dd78dfeeb82f1bc19f89887ecace5497114261c.zip
Disable checkEOF when processing PS files. It's perfectly valid to have an %%EOF comment in the middle of a file if it includes other documents.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1614055 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--lib/xmlgraphics-commons-svn-trunk.jarbin631543 -> 631602 bytes
-rw-r--r--src/java/org/apache/fop/render/ps/ResourceHandler.java1
-rw-r--r--test/java/org/apache/fop/render/ps/ResourceOptimizationTestCase.java1
3 files changed, 2 insertions, 0 deletions
diff --git a/lib/xmlgraphics-commons-svn-trunk.jar b/lib/xmlgraphics-commons-svn-trunk.jar
index 944d63df5..bb5e5950d 100644
--- a/lib/xmlgraphics-commons-svn-trunk.jar
+++ b/lib/xmlgraphics-commons-svn-trunk.jar
Binary files differ
diff --git a/src/java/org/apache/fop/render/ps/ResourceHandler.java b/src/java/org/apache/fop/render/ps/ResourceHandler.java
index 95b544ec2..b4e138cff 100644
--- a/src/java/org/apache/fop/render/ps/ResourceHandler.java
+++ b/src/java/org/apache/fop/render/ps/ResourceHandler.java
@@ -150,6 +150,7 @@ public class ResourceHandler implements DSCParserConstants, PSSupportedFlavors {
int pageCount, Rectangle2D documentBoundingBox)
throws DSCException, IOException {
DSCParser parser = new DSCParser(in);
+ parser.setCheckEOF(false);
PSGenerator gen = new PSGenerator(out);
parser.addListener(new DefaultNestedDocumentHandler(gen));
diff --git a/test/java/org/apache/fop/render/ps/ResourceOptimizationTestCase.java b/test/java/org/apache/fop/render/ps/ResourceOptimizationTestCase.java
index 4f06938d2..8a548b1b5 100644
--- a/test/java/org/apache/fop/render/ps/ResourceOptimizationTestCase.java
+++ b/test/java/org/apache/fop/render/ps/ResourceOptimizationTestCase.java
@@ -83,6 +83,7 @@ public class ResourceOptimizationTestCase extends AbstractPostScriptTest {
in = new java.io.BufferedInputStream(in);
try {
DSCParser parser = new DSCParser(in);
+ parser.setCheckEOF(false);
//The first form is for arrow_down_small.png (to be reused)
PSResource form1 = new PSResource(PSResource.TYPE_FORM, "FOPForm:1");