You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by wmurrill <gs...@yahoo.com> on 2007/03/30 00:12:05 UTC
xmlfiltering produces invalid pdf
I use xmlfilters to perform several transformations;
the last xmlfilter produces the pdf:
xmlFilter3.setContentHandler(fop.getDefaultHandler());
xmlFilter3.parse(new InputSource("foo.xml"));
Under fop-0.20.3 this worked - not so using fop-trunk.
Viewing the pdf in a text editor, it shows everything
is there except the trailer. I modified
PDFDocument.java to flush the stream after writing the
trailer, and now xmlfiltering works as expected.
Maybe this patch can be of use to others. Patch
applied:
--- PDFDocument.java-orig 2006-10-10
12:05:58.837715000 -0500
+++ PDFDocument.java 2007-03-23 15:28:17.595412000
-0500
@@ -935,6 +935,7 @@
/* write the trailer */
stream.write(encode(pdf));
+ stream.flush();
}
/**
____________________________________________________________________________________
TV dinner still cooling?
Check out "Tonight's Picks" on Yahoo! TV.
http://tv.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org