Re: [xsl] Winddings, symbol etc

Subject: Re: [xsl] Winddings, symbol etc
From: Geert Josten <Geert.Josten@xxxxxxxxxxx>
Date: Thu, 13 Oct 2005 20:12:43 +0200
Hi Mark,

Odd, because I am currently employing this method with considerable success. You don't need Office
Pro, though. You can just save the document as WordML (Save As XML) and apply the XSL from VBA or
externally. And I really did not need to tweak much to get very good results with FOP.

About the Wingdings font: FOP doesn't support the Wingding font. It doesnt have a unicode mapping table. Try creating a fontmetrics file for it and you will find out yourself. If you can't register the font properly in FOP, it won't come out, regardless of Acrobat having Wingdings font available or not.

Embedding is done to make sure that the characters are shown properly, even on machines that dont have the correct fonts installed...

Cheers,
Geert

Mark Williams wrote:

Hi Geert,

Thanks for suggestion.  Downloaded the stuff only to eventually discover that transform only
works for office pro, which I don't have.

Word wouldn't be suitable for what we are doing.  I am writing a rtf word processor which will
also support xslt.  The word processor is similar to Word, but the functionality is cut down to
only that which xslfo supports. I will also be designing it to convert according to which
renderer is in use.  FOP for example is more limited than the commercial renderers, but often you
can tweak the xslfo to cheat it.  All this is much easier to do from your own custom word
processor than trying to automate Word (I say this from a position of experience having first
tried to go down the word route - itbs a nightmare).

This is all fairly well advanced and I have written my own engine for conversion, but I have a
few niggles such as symbol, wingdings and using the ascii extended codes.

I readily confess that my knowledge of xsl is pretty limited, however, so are my requirements.

All I really want to know is how I represent the symbol and wingding fonts in xslfo and how I can
use the extended ascii codes.

The latter, I have pretty much figured out.  I think that all you have to do is use the html
representation fo the character.  This way I seem to be able to recover at least 50% of the
extended characters.

This leaves me trying to figure out how I use symbol and wingdings fonts.  My understanding is
that there is no need to embed these fonts.  Acrobat has already embedded them.

I therefore assumed that if I insert the character 'a' into an xslfo document and declare the
font family as wingdings it would appear in pdf as  a. But it doesn't it appears as 'a' and
symbol appears as '#'.  Any idea why and what I need to do to get these to work?


-----Original Message----- From: Geert Josten [mailto:Geert.Josten@xxxxxxxxxxx] Sent: Thursday,
October 13, 2005 3:45 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [xsl] Winddings,
symbol etc

Mark,

Ever considered saving the RTF to WordML with Word 2003 and converting the WordML to XSL-FO
using the stylesheets available on http://msdn.microsoft.com/library/default.asp?url=/library/en- us/odc_wd2003_ta/html/OfficeWordWordMLtoXSL-FO.asp


(download the exe, that contains the xsl's you need)

It is written by XEP and tweaked for their parser, but it should work with FOP with only minor
adjustments..

Cheers, Geert

Mark Williams wrote:


Hi Jon,

Windows XP FOP Saxon parser RTF documents using my own RTF to XSL converter (still in

development).


Below is an example of the xslfo I am ouputting:

<fo:block font-family="Helvetica" font-size="11"

text-align="left">128 P</fo:block><fo:block font-family="Helvetica" font-size="11"
text-align="left">129 P</fo:block><fo:block font-family="Helvetica" font-size="11" text-align="left">130 b</fo:block><fo:block font-family="Helvetica" font-size="11"
text-align="left">131 Q</fo:block><fo:block font-family="Helvetica" font-size="11" text-align="left">132 b</fo:block><fo:block font-family="Helvetica" font-size="11"
text-align="left">133 b&</fo:block><fo:block font-family="Helvetica" font-size="11" text-align="left">134 b </fo:block><fo:block font-family="Helvetica" font-size="11"
text-align="left">135 b!</fo:block><fo:block font-family="Helvetica" font-size="11" text-align="left">136 b,</fo:block><fo:block font-family="Helvetica" font-size="11"
text-align="left">137 b0</fo:block><fo:block font-family="Helvetica" font-size="11" text-align="left">138 P </fo:block>


And follow is the text extracted from the resulting pdf

when the above xslfo is run through fop:


128 ? 129 ? 130 ? 131 ? 132 ? 133 ? 134 ? 135 ? 136 ? 137 ? 138 ?

The numbers on the left obviously represent the extended

ascii table code.


When I ouput the following xslfo: <fo:block font-family="Symbol" font-size="11" text-align="left">abcdefghijklmnopqrstuvwxyz</fo:block>

The pdf outputs ##########################

Apologies if I'm still not giving you the info you need. I

don't fully understand the process involved here. I assumed that if pdf supports arial etc it would support the extended ascii codes. Is someone able to advise me what is wrong with my xslfo code?

Thanks,

Mark



-----Original Message----- From: Jon Gorman [mailto:jonathan.gorman@xxxxxxxxx] Sent:
Thursday, October 13, 2005 2:43 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [xsl]
Winddings, symbol etc

Might also want to look into embedding the font. This list

isn't too


active with the XSL-FO side of XSL, so I don't know how

much help you


can get there.  I'd check out the manual for whatever you're using (FOP, XEP) as these
issues are pretty common.  It can be a pain dealing with character sets/fonts but perhaps
someone else

has better


info. As Geert mentioned, you are best off using the Unicode characters.

Of course, might be more helpful if you described the

process and told


us things like system environment, character sets of input,

character


sets of outputs, documents, fonts tried, and xsl-fo processor used.


Jon Gorman




-- Drs. G.P.H. Josten Consultant




Daidalos BV Source of Innovation Hoekeindsehof 1-4 2665  JZ  Bleiswijk Tel: +31 (0) 10 850 1200
 Fax: +31 (0) 10 850 1199 www.daidalos.nl


De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen,
verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.




-- Drs. G.P.H. Josten Consultant



Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665  JZ  Bleiswijk
Tel: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl


De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.

Current Thread