Hello, everyone. Apologies in advance if this has been answered elsewhere, but I have not been able to find a solution to my issue.

I am trying to render PDF content that contains embedded MathML, a sample of which is contained in the message below. I found the JEuclid plugin, and have successfully integrated it with Apache FOP such that my MathML contained in instream-foreign-object blocks gets passed to the plugin -- the MathML is being rendered by JEuclid, albeit improperly. The issue I have seems to be with fonts; many of the valid escape sequences (e.g. −) get rendered as # characters, as if the FOP renderer encountered a character that was not in the font family it was using. If I pass the exact same sample.fo file to the JEuclid MathViewer application at the following link (requires JDK 1.5 Web Start to run):

http://jeuclid.sourceforge.net/jeuclid-webstart/mathviewer.jnlp

.. the math renders perfectly. I have tried registering the JEuclid recommended fonts (e.g. DejaVu) with the FOP renderer, and while the fonts for the body text do change, the equation remains unchanged. I am not sure if this is an issue with the configuration for FOP or JEuclid -- the latter is pretty sparse -- so I am hoping someone has encountered this issue and might be able to give me some pointers.


--
Deryl Seale -- Director of Engineering
c: 734.883.9636
[EMAIL PROTECTED]
www.intel-assess.com


-=-=-=-=-=-=-=-=- SAMPLE FO -=-=-=-=-=-=-=-=-

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"; xmlns:m="http:// www.w3.org/1998/Math/MathML">
    <fo:layout-master-set>
        <fo:simple-page-master master-name="only">
<fo:region-body region-name="xsl-region-body" margin="0.7in"/> <fo:region-before region-name="xsl-region-before" extent="0.7in" display-align="before"/> <fo:region-after region-name="xsl-region-after" display- align="after" extent="0.7in"/>
        </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="only">
        <fo:flow flow-name="xsl-region-body">
            <fo:block>
        A sample equation:
        <fo:instream-foreign-object>
        <m:math>
        <m:mrow>
          <m:mrow>
            <m:mo>(</m:mo>
            <m:mrow>
              <m:mn>6</m:mn>
              <m:msup>

                <m:mi>y</m:mi>
                <m:mn>3</m:mn>
              </m:msup>
              <m:mo>+</m:mo>
              <m:mn>2</m:mn>
              <m:msup>
                <m:mi>y</m:mi>

                <m:mn>2</m:mn>
              </m:msup>
              <m:mo>&#8722;</m:mo>
              <m:mi>y</m:mi>
              <m:mo>&#8722;</m:mo>
              <m:mn>12</m:mn>

            </m:mrow>
            <m:mo>)</m:mo>
          </m:mrow>
        </m:mrow>
      </m:math>
      </fo:instream-foreign-object>
            </fo:block>
        </fo:flow>
    </fo:page-sequence>
</fo:root>



Reply via email to