DO NOT REPLY [Bug 24376] New: - [PATCH] Missing .close() calls on streams opened for Tiff images
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24376. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24376 [PATCH] Missing .close() calls on streams opened for Tiff images Summary: [PATCH] Missing .close() calls on streams opened for Tiff images Product: Fop Version: 0.20.5 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: images AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The code for TIFF image handling is missing .close() statements for some of the streams opened. The can lead to out of file handle problems especially in environments where fop is embedded in server type applications. This patch is against 0.20.5. If the same source is used for 1.0 then the patch should be applied there too.
DO NOT REPLY [Bug 24376] - [PATCH] Missing .close() calls on streams opened for Tiff images
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24376. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24376 [PATCH] Missing .close() calls on streams opened for Tiff images --- Additional Comments From [EMAIL PROTECTED] 2003-11-04 08:46 --- Created an attachment (id=8907) Unified diff against 0.20.5
DO NOT REPLY [Bug 24378] New: - Minor problem in sample code for embedding
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24378. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24378 Minor problem in sample code for embedding Summary: Minor problem in sample code for embedding Product: Fop Version: all Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: documentation AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The sample code on the FOP web site for embedding uses in a number of places constructs like Driver driver = new Driver(new InputSource(args[0]), new FileOutputStream(args[1])); or driver.setOutputStream(new FileOutputStream(args[1])); Using new ...Stream(...) as a constructor or function argument is dangerous as the stream doesn't get closed until the object is garbage collected. This can lead to out of file handle conditions. I learned this the hard way with a (supposedly) perfectly working server application which had fop embedded. The app ran happily for over two years. Then a hardware upgrade came along and the system admin changed the Java VM settings to give it more memory as the new machine had lots of it. Suddenly the system was running out of file handles because the Java VM did less garbage collection which in turn kept all those implicitly constructed streams open. The sample code should probably be looking more like FileOutputStream fos = new FileOutputStream(args[1]); Driver driver = new Driver(new InputSource(args[0]), fos); fos.close(); or to make sure the file is always closed like: FileOutputStream fos = null; try { fos = new FileOutputStream(args[1]); Driver driver = new Driver(new InputSource(args[0]), fos); fos.close(); } finally { if (fos != null) { try { fos.close(); } catch (IOException ioe) {} } } which is probably an overkill for the sake of the example.
[PATCH] Fix DPI for PDF Transcoder.
Hi all, I've attached a patch to the PDF transcoder which changes the UserAgent to always report a pixel to millimeter conversion corresponding to 72dpi. This is required because this is the default userspace of the PDFGraphics2D. It also fixes a minor issue with how the PDF graphics is setup. Index: src/java/org/apache/fop/svg/PDFTranscoder.java === RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/svg/PDFTranscoder.java,v retrieving revision 1.7 diff -w -u -r1.7 PDFTranscoder.java --- src/java/org/apache/fop/svg/PDFTranscoder.java 11 Oct 2003 14:48:49 - 1.7 +++ src/java/org/apache/fop/svg/PDFTranscoder.java 2 Nov 2003 18:12:10 - @@ -119,6 +119,15 @@ } +protected org.apache.batik.bridge.UserAgent createUserAgent() { +return new SVGAbstractTranscoderUserAgent() { +// The PDF stuff wants everything at 72dpi +public float getPixelUnitToMillimeter() { +return 0.3427778f; +} +}; +} + /** * @see org.apache.avalon.framework.configuration.Configurable#configure(Configuration) */ @@ -158,7 +167,7 @@ try { graphics.setupDocument(output.getOutputStream(), w, h); -graphics.setSVGDimension(width, height); +graphics.setSVGDimension(w, h); if (hints.containsKey(ImageTranscoder.KEY_BACKGROUND_COLOR)) { graphics.setBackgroundColor
DO NOT REPLY [Bug 23883] - SVG embedded in FO cannot handle large (6digit) translates
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23883. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23883 SVG embedded in FO cannot handle large (6digit) translates --- Additional Comments From [EMAIL PROTECTED] 2003-11-04 15:13 --- OK, the cause of the bug is a buggy doubleOut() implementation which does not expect scientific notation (1.0E-4) for small numbers. The next implementation (tested in 0.20.5) looks to solve most problems, although lines are still drawn wrong with at least Acrobat5. I cannot test with Acrobat6, cause that's not installed at this workstation. (I'll look at that at home) =pdf/PDFNumber.java public class PDFNumber { static java.text.DecimalFormat myFormatter = new java.text.DecimalFormat(#. ); public static String doubleOut(Double doubleDown) { return doubleOut(doubleDown.doubleValue()); } public static String doubleOut(double doubleDown) { return myFormatter.format(doubleDown); } public static String doubleOut(double doubleDown, int dec) { return doubleOut(doubleDown); } }
DO NOT REPLY [Bug 23883] - SVG embedded in FO cannot handle large (6digit) translates
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23883. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23883 SVG embedded in FO cannot handle large (6digit) translates --- Additional Comments From [EMAIL PROTECTED] 2003-11-04 15:18 --- Created an attachment (id=8916) new output after fix
DO NOT REPLY [Bug 23883] - SVG embedded in FO cannot handle large (6digit) translates
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23883. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23883 SVG embedded in FO cannot handle large (6digit) translates --- Additional Comments From [EMAIL PROTECTED] 2003-11-04 22:06 --- Tom, Couple of comments: (1.) You mentioned another bug earlier in this thread, separate from this issue, that fails in *both* 6.0 and 5.5--it may be good to add that issue in a separate Bugzilla report so it isn't forgotten. (2.) Would you like me to hold off on this patch until you have it working for 6.0? IIRC the code *was* working OK in 6.0 but failing in 5.5--I wouldn't want to apply a patch that would cause the reverse to occur. Thanks, Glen
cvs commit: xml-fop/src/java/org/apache/fop/render/rtf - New directory
gmazza 2003/11/04 15:48:35 xml-fop/src/java/org/apache/fop/render/rtf - New directory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/render/rtf/rtflib - New directory
gmazza 2003/11/04 15:49:16 xml-fop/src/java/org/apache/fop/render/rtf/rtflib - New directory - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: xml-fop/src/java/org/apache/fop/rtf/rtflib/tools ImageConstants.java ImageUtil.java package.html
gmazza 2003/11/04 15:59:14 Modified:.build.xml src/java/org/apache/fop/apps Driver.java Added: src/java/org/apache/fop/render/rtf BuilderContext.java FoUnitsConverter.java PageAttributesConverter.java RTFHandler.java TableAttributesConverter.java TableContext.java TextAttributesConverter.java src/java/org/apache/fop/render/rtf/rtflib/exceptions RtfException.java RtfStructureException.java package.html src/java/org/apache/fop/render/rtf/rtflib/interfaces ITableColumnsInfo.java package.html src/java/org/apache/fop/render/rtf/rtflib/rtfdoc BorderAttributesConverter.java IRtfAfterContainer.java IRtfBeforeContainer.java IRtfBookmarkContainer.java IRtfExternalGraphicContainer.java IRtfHyperLinkContainer.java IRtfJforCmdContainer.java IRtfListContainer.java IRtfOptions.java IRtfPageBreakContainer.java IRtfPageContainer.java IRtfPageNumberCitationContainer.java IRtfPageNumberContainer.java IRtfParagraphContainer.java IRtfParagraphKeepTogetherContainer.java IRtfTableContainer.java IRtfTextContainer.java IRtfTextrunContainer.java ITableAttributes.java IrtfTemplateContainer.java ParagraphKeeptogetherContext.java RtfAfter.java RtfAfterBeforeBase.java RtfAttributes.java RtfBefore.java RtfBookmark.java RtfBookmarkContainerImpl.java RtfColorTable.java RtfContainer.java RtfDocumentArea.java RtfElement.java RtfExternalGraphic.java RtfExtraRowSet.java RtfFile.java RtfFontManager.java RtfFontTable.java RtfHeader.java RtfHyperLink.java RtfJforCmd.java RtfLineBreak.java RtfList.java RtfListItem.java RtfListTable.java RtfNull.java RtfOptions.java RtfPage.java RtfPageArea.java RtfPageBreak.java RtfPageNumber.java RtfPageNumberCitation.java RtfParagraph.java RtfParagraphKeepTogether.java RtfSection.java RtfString.java RtfStringConverter.java RtfStyleSheetTable.java RtfTable.java RtfTableCell.java RtfTableRow.java RtfTemplate.java RtfText.java RtfTextrun.java WhitespaceCollapser.java package.html src/java/org/apache/fop/render/rtf/rtflib/testdocs BasicLink.java CreateTestDocuments.java DummyTableColumnsInfo.java ExternalGraphic.java ListInTable.java MergedTableCells.java NestedTable.java ParagraphAlignment.java SimpleDocument.java SimpleLists.java SimpleTable.java TestDocument.java TextAttributes.java Whitespace.java package.html src/java/org/apache/fop/render/rtf/rtflib/tools ImageConstants.java ImageUtil.java package.html Removed: src/java/org/apache/fop/rtf/renderer BuilderContext.java FoUnitsConverter.java PageAttributesConverter.java RTFHandler.java TableAttributesConverter.java TableContext.java TextAttributesConverter.java src/java/org/apache/fop/rtf/rtflib package.html src/java/org/apache/fop/rtf/rtflib/exceptions RtfException.java RtfStructureException.java package.html src/java/org/apache/fop/rtf/rtflib/interfaces ITableColumnsInfo.java package.html src/java/org/apache/fop/rtf/rtflib/rtfdoc BorderAttributesConverter.java IRtfAfterContainer.java IRtfBeforeContainer.java IRtfBookmarkContainer.java IRtfExternalGraphicContainer.java IRtfHyperLinkContainer.java IRtfJforCmdContainer.java IRtfListContainer.java IRtfOptions.java IRtfPageBreakContainer.java IRtfPageContainer.java IRtfPageNumberCitationContainer.java IRtfPageNumberContainer.java IRtfParagraphContainer.java
Re: [VOTE] Two changes to 1.0 branch
Team, I moved RTF and MIF to new fop.render.* packages. Also the RTF Library has been moved under render.rtf. Now most of our render-type specific code is under its respective render type in our package structure. I hope this becomes a cleaner design, if not we can revisit moving non-render specific code to separate lib directories later. I will hold off doing anything with the PDF library still at the root until its use in FOP is further analyzed. (Perhaps more than one package is needed, or some files are obsolete, etc., etc.) I don't see a rush on this, however--it can stay there for quite some time. Another issue I was working on last weekend--still unsolved--was that in 1.0 layout, fo:block space-before is being added to the top of *each* page that the block consumes (instead of just once at the top of the block). This may take some time to fix--I'll keep working on it. Thanks, Glen --- Jeremias Maerki [EMAIL PROTECTED] wrote: 2.) Move org.apache.fop.rtf.renderer to org.apache.fop.render.rtf. It doesn't matter that the RTF renderer doesn't need an area tree, or descend from our AbstractRenderer.java, etc., etc.--actually, that may be something to celebrate. For the solid foundation that Victor was talking about, the renderers should be placed together in the same package--sooner or later they're probably all going to be implementing a common (very) high-level interface anyway. [Are you in sufficient agreement on this one, Victor...if you can take of this with Peter's latest patch, that would be great...] +0, too. 3.) Move the rest of the rtf packages under org.apache.fop.render.rtf. No more rtf in FOP's root. (This issue is more controversial than #2 above, and can wait.) I don't see why this is more controversial than #2. It's practically the same as #2. +0 __ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree
DO NOT REPLY [Bug 24376] - [PATCH] Missing .close() calls on streams opened for Tiff images
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24376. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24376 [PATCH] Missing .close() calls on streams opened for Tiff images --- Additional Comments From [EMAIL PROTECTED] 2003-11-05 01:04 --- Created an attachment (id=8937) Diff file with the arguments reversed 'diff -u old file new file' - hope I got it right this time