In our software, we use Apache FOP 0.20.5 (I know this is an old version, we can't update it as it's an old version of our software) to create "pretty" style reports. We have one in particular that I created by importing a PDF into InkScape then generating the XML of the SVG(s) from that. When sending this particular form to the printer (via the -print option), it takes an exceptionally long time, i.e. 5+ minutes. When I do either a print preview (-awt) or send it directly to a pdf (-pdf) it takes hardly any time at all, but the text has HEAVY artifacting to the point of it not even being readable.
We do this with plenty of other reports/forms that have unique/complicated stylesheets without problems that I know of. Does anybody have ANY idea what could be going on here? Ideally I'd fix the speed issue, but a workaround of just removing t开发者_开发技巧he artifacts on the -pdf version would be sufficient. I've manually gone through the xsl that InkScape creates and tried to remove anything non-critical, but it doesn't seem to make any difference.
Would love to hear any ideas no matter how far fetched they may be.
Edit: Forgot to mention that this error gets spat out hundreds (thousands) of times during the print process:
Graphics2D from BufferedImage lacks BUFFERED_IMAGE hint
I figured it out:
The output from InkScape had put <g>
tags in for each of my layers. Apparently, FOP takes 2 full orders of magnitude more time to deal with these than not.
I pulled out all the <g>
's and my 5 minute thing magically rendered in 5 seconds.
精彩评论