Tim Butterworth wrote:
I am struggling to locate a mailing list as I am indeed using ’server’.

It's xfc-support@xmlmind.com. See "Mailing Lists", https://www.xmlmind.com/foconverter/mailing_lists.html




I am using xsl server pro 5.4.3 on a linux server, and generating PDF from the 
command line.


Sorry but XMLmind XSL-FO Converter version 5 is no longer supported.

See "Support policy", https://www.xmlmind.com/foconverter/support_policy.html
---
Also please note that we support only the last major version of the software. For example, if latest release is v7.2, we'll respond to support requests about v7.0, v7.1, v7.2, but not to those about v6.9. If you are using an old version, please upgrade to latest version and check whether this fixes the issue.
---




I have tried changing the fonts in the XSL document definition to Arial but it 
has had no effect.


This is a first step, but Apache FOP, the XSL-FO processor you use to generate PDF, does not know anything about the Arial fonts. So what you did is currently ignored by Apache FOP.

May be what follows will work (not tested it, because in principle, I'm not allowed to help you):

1) Save attached FOP configuration file "fop.conf" somewhere:
---
<?xml version="1.0"?>
<fop>
  <renderers>
    <renderer mime="application/pdf">
      <fonts>
        <font embed-url="file:/usr/share/fonts/truetype/arial.ttf"
              kerning="yes">
          <font-triplet name="Arial" style="normal" weight="normal"/>
          <font-triplet name="sans-serif" style="normal" weight="normal"/>
        </font>
        <font embed-url="file:/usr/share/fonts/truetype/arialbd.ttf"
              kerning="yes">
          <font-triplet name="Arial" style="normal" weight="bold"/>
          <font-triplet name="sans-serif" style="normal" weight="bold"/>
        </font>
        <font embed-url="file:/usr/share/fonts/truetype/arialbi.ttf"
              kerning="yes">
          <font-triplet name="Arial" style="italic" weight="bold"/>
          <font-triplet name="sans-serif" style="italic" weight="bold"/>
        </font>
        <font embed-url="file:/usr/share/fonts/truetype/ariali.ttf"
              kerning="yes">
          <font-triplet name="Arial" style="italic" weight="normal"/>
          <font-triplet name="sans-serif" style="italic" weight="normal"/>
        </font>
      </fonts>
    </renderer>
  </renderers>
</fop>
---

Let's suppose you save it to "/opt/apache-tomcat-9.0.21/webapps/fop.conf"

2) IMPORTANT: Edit this configuration file to specify the actual locations of all "arial*.ttf" files.

3) Find a way to pass system property "XXE_FOP_CONFIG" to the XMLmind XSL Server

This system property should point to the location of the FOP configuration file, e.g.

-DXXE_FOP_CONFIG=/opt/apache-tomcat-9.0.21/webapps/fop.conf

Please specify an absolute file path here. A "file:" URL works too.

-DXXE_FOP_CONFIG=file:///opt/apache-tomcat-9.0.21/webapps/fop.conf



--> I'm really sorry but I will not help you more than this unless you upgrade to XMLmind XSL-FO Converter version 6.





Initial support request:
=========================================================================================================
On 08/09/2019 03:38 PM, Tim Butterworth wrote:
>
> I am having a slight issue with generating a PDF file using xmlmind
> server which contains the character ş
>
>
>
> I generate both a DOCx word file and A pdf.
>
> - In the word file it works perfectly and renders ok;
> - in the PDF file it just renders as #
>
> I have tried i the XML file to change the character to
>
> &#351;
>
> or
> &#x015F;
>
> And the results are unchanged.
>

This is a well-known PDF issue. You cannot use any of the standard PDF fonts (Helvetica, Times, Courier, etc) to convert a document containing characters such as &#x015F; as these standard PDF fonts contain very few glyphs.

This FAQ explains what is the problem (applies to PDF in general; I mean not specific to XMLmind) and how to solve it in the context of XMLmind XML Editor:

---
When I convert documents written in Russian (or Polish or Czech or any non-western language) to PDF, almost all characters are replaced by the "#" character. Is there a workaround for this problem?
---
https://www.xmlmind.com/xmleditor/faq.html#custom_pdf_fonts

If you are not using XMLmind XML Editor (you wrote "xmlmind server"), please send a support request to the corresponding mailing list. We need to know which product, which product version, which OS, which Java, etc, you are using.
=========================================================================================================
<?xml version="1.0"?>
<fop>
  <renderers>
    <renderer mime="application/pdf">
      <fonts>
        <font embed-url="file:/usr/share/fonts/truetype/arial.ttf"
              kerning="yes">
          <font-triplet name="Arial" style="normal" weight="normal"/>
          <font-triplet name="sans-serif" style="normal" weight="normal"/>
        </font>
        <font embed-url="file:/usr/share/fonts/truetype/arialbd.ttf"
              kerning="yes">
          <font-triplet name="Arial" style="normal" weight="bold"/>
          <font-triplet name="sans-serif" style="normal" weight="bold"/>
        </font>
        <font embed-url="file:/usr/share/fonts/truetype/arialbi.ttf"
              kerning="yes">
          <font-triplet name="Arial" style="italic" weight="bold"/>
          <font-triplet name="sans-serif" style="italic" weight="bold"/>
        </font>
        <font embed-url="file:/usr/share/fonts/truetype/ariali.ttf"
              kerning="yes">
          <font-triplet name="Arial" style="italic" weight="normal"/>
          <font-triplet name="sans-serif" style="italic" weight="normal"/>
        </font>
      </fonts>
    </renderer>
  </renderers>
</fop>
--
XMLmind FO Converter Support List
xfc-support@xmlmind.com
https://www.xmlmind.com/mailman/listinfo/xfc-support

Reply via email to