diff options
author | Vincent Hennebert <vhennebert@apache.org> | 2014-07-28 15:29:10 +0000 |
---|---|---|
committer | Vincent Hennebert <vhennebert@apache.org> | 2014-07-28 15:29:10 +0000 |
commit | 5dd78dfeeb82f1bc19f89887ecace5497114261c (patch) | |
tree | ce3e2df4fb66ece02a381dab4debbed047d86a2e | |
parent | e5fd61ed972a5548675fbcc784d2693119fe548c (diff) | |
download | xmlgraphics-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.jar | bin | 631543 -> 631602 bytes | |||
-rw-r--r-- | src/java/org/apache/fop/render/ps/ResourceHandler.java | 1 | ||||
-rw-r--r-- | test/java/org/apache/fop/render/ps/ResourceOptimizationTestCase.java | 1 |
3 files changed, 2 insertions, 0 deletions
diff --git a/lib/xmlgraphics-commons-svn-trunk.jar b/lib/xmlgraphics-commons-svn-trunk.jar Binary files differindex 944d63df5..bb5e5950d 100644 --- a/lib/xmlgraphics-commons-svn-trunk.jar +++ b/lib/xmlgraphics-commons-svn-trunk.jar 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"); |