Re: [Jeuclid-users] Line Breaking algorithm
Brought to you by:
maxberger
From: Jason Z. <jz...@gm...> - 2009-04-02 14:22:12
|
I reprinted a few times in colour and black and white, and noticed that the original colour printout was the worst. Perhaps it is partly the fault of our printer. But I think if the PDF contained characters rather than vector images the output would be consistent. Why is the text converted to paths rather than kept as SVG text? Would this be a difficult change to the codebase? On Thu, Apr 2, 2009 at 4:03 PM, Jason Zaugg <jz...@gm...> wrote: > Our solution for Saxon integration is a Java extension method ( > http://www.saxonica.com/documentation/extensibility/functions.html) which > is passed a DOM node with the MathML, and returns a String containing the > SVG. > > This string is used to create a special URL with the scheme 'data', which > is a RenderX XEP specific. The XSL looks like: > > <fo:external-graphic src="{concat('data:image/svg,', > mathml:svg($mathMlNode, 1.0))}"/> > > To turn this into a generally useful component, we would need to expose the > configuration API of JEuclid -- currently this is hard-coded in our Java > extension method. I'm not sure this would be worthwhile. > > Block presentation is sufficient for us, inline presentation would clearly > require some co-operation with the RenderX layout engine. We can also > specify the content width in advance. We generate the MathML dynamically, so > we could also insert line-break hints. > > Are you saying the JEuclid integration in FOP already supports line breaks, > or just that it would not require custom integration? We did try FOP > initially, but decided on RenderX. However, it is possible to embed PDFs > into RenderX using <fo:external-graphic>, so we could render the formulas to > PDF using FOP and include them. > > We have run into some more basis problems with the printed output -- the > formulas seem blurred. I suspect this is because the text in the SVG is > converted to paths, rather than being represented as text. Are there any > tricks to acheiving better print output? (I'll email you a sample document > separately.) > > After we can sharpen up the print output, we'll decide how to proceed with > the line-breaking. > > Regards, > > Jason > |