'#' instead of non-ascii character in PDF

Having trouble installing Oxygen? Got a bug to report? Post it all here.
urukay
Posts: 4
Joined: Mon Mar 15, 2010 5:51 pm

'#' instead of non-ascii character in PDF

Post by urukay »

Hi,

can please point me to the right direction? Have been trying to find solution to this problem (better say problem of my language-Slovak). I've set encodinf of *.fo file to UTF-8, but after transforming *.fo file to PDF file, i see '#' instead of character like 'č', but not in character 'š'. And i just cant find proper solution anywhere.

Thanks

Radovan
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: '#' instead of non-ascii character in PDF

Post by adrian »

Hello,

The problem is that the characters you use aren't supported by the default font used for the PDF. You have to embed in the PDF a font that supports these characters.

There is a procedure in the Oxygen User Manual for setting a font for the PDF output generated with Apache FOP transformation:

http://www.oxygenxml.com/doc/ug-oxygen/ ... uiltin-FOP

Let us know if you need further help or information.

Regards,
Adrian

PS:
If you have multiple projects you may want to omit the base tag from the fopConfiguration.xml and instead use absolute URLs. e.g.

Code: Select all

<font metrics-url="file:/Project/fonts/Arialuni.xml"
embed-url="file:/Library/Fonts/Arialuni.ttf">
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
urukay
Posts: 4
Joined: Mon Mar 15, 2010 5:51 pm

Re: '#' instead of non-ascii character in PDF

Post by urukay »

Well thanks for pointing me somewhere, but after few hours of trying all i get is bunch of incomprehensible errors.
I got till "Add new font to FO output" but from then only errors.

Also in that atricle, there few errors, that need to be corrected.

So far no success with this problem
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: '#' instead of non-ascii character in PDF

Post by adrian »

Hello,

I'm sorry, there are indeed a few mistakes in the scripts(an extra quote and a line broken in two).

To make things simple:
For Linux/Mac create ttfConvert.sh:

Code: Select all

#!/bin/sh
java -cp lib/fop.jar:lib/avalon-framework-4.2.0.jar:lib/xercesImpl.jar org.apache.fop.fonts.apps.TTFReader "$@"
For Windows create ttfConvert.bat:

Code: Select all

@echo off
java -cp lib/fop.jar;lib/avalon-framework-4.2.0.jar;lib/xercesImpl.jar org.apache.fop.fonts.apps.TTFReader %1 %2 %3 %4 %5 %6 %7 %8
and then just launch them from the command line and specify as arguments the ttf file and the xml file.
Linux: sh ttfConvert.sh /path/to/font/fontfile.ttf /path/to/xml/xmlfile.xml
Windows: ttfConvert.bat "C:\Path\To\Font\fontfile.ttf" "C:\Path\To\XML\xmlfile.xml"

And then you can continue from the section Register font to FOP configuration.

Let me know if you need further help.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
urukay
Posts: 4
Joined: Mon Mar 15, 2010 5:51 pm

Re: '#' instead of non-ascii character in PDF

Post by urukay »

Hello Adrian,

as I said the problems start when trying "Add new font to FO output". It's really frustrating, have tryied for 2 days and almost anything to get it working, but no success. All the errors I get, when trying to transform *.fo to PDF with new font, are incomprehensible for me. Maybe if I had more information what's wrong...but I don't have :-S

Maybe the problem is not in the font, i'm starting to believe that problem is elsewhere.

The error I'm facing is in <saxon6:script implements-prefix="s6hl" language="java" src="java:net.sf.xslthl.ConnectorSaxon6" />

SystemID: C:\Program Files (x86)\Oxygen XML Editor 11\frameworks\docbook\xsl\highlighting\common.xsl
Engine name: Saxon6.5.5
Severity: warning
Description: Failed to load net.sf.xslthl.ConnectorSaxon6 - net.sf.xslthl.ConnectorSaxon6
Start location: 33:0


Thanks

Radovan
urukay
Posts: 4
Joined: Mon Mar 15, 2010 5:51 pm

Re: '#' instead of non-ascii character in PDF

Post by urukay »

Well, my desperate attempt to solve this problem was I guess successfull...just copied fonts to JRE fonts directory and it worked..everything is working fine. :-)

Thanks for your time and effort. I really appreciate it!

Radovan
Post Reply