• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to change the font-family in XSLT file

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have created xml to pdf using xslt now I have problem of changing the font of generated pdf file.

How can I change the font of generated pdf file.

How can I specify the font-family in xslt file so that generated pdf file will be in that specified font.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is nothing to do with XSLT per-say. Consult the documentation for whatever API you use to create your PDF.
 
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are asking about XSL-FO, I just searched the web and found out that the <fo:block> element can have a font-family attribute.
 
prashant fusate
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Paul Clapham
Thanks for your update.

But when I used font-family="arial" at that time it does not make any sence.
because arial is not a standerd font for FOP.So how can I used my winodows font to genrate the output PDF file

Thank you
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the problem this? You may need to keep a font configuration file.
 
prashant fusate
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Thanks for the document,
But my problem is something different I want to register windows font with FOP.

To do that I have genrated respective xml files(arial.xml,arialdb.xml ) by using windows arial.ttf file

java -cp build\fop.jar;lib\avalon-framework.jar;lib\xml-apis.jar;
lib\xercesImpl.jar;lib\xalan.jar
org.apache.fop.fonts.apps.TTFReader enc ansi D:\iBOLT2.5sp6b\projects\PDFArial\fop-config\font\ariali.ttf D:/iBOLT2.5sp6b/projects/PDFArial/fop-config\xml\ariali.xml

and specified genrated xml file in configuration file(i.e userconfig.xml ) to register the windows font in FOP.

by doing all this thing also I am not get output pdf with arial font

Could you please suggest what is wrong I am doing here.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I am not get output pdf with arial font


What does this mean? Are there exceptions during PDF generation? Does the text not show up in the PDF? Does it appear in some other font? When viewing the font, are all desired fonts accessible?
 
prashant fusate
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

Yes I getting the are as follows
unknown font Arial,normal,normal so defaulted font to any
[ERROR] unknown font Arial,normal,normal so defaulted font to any
[ERROR] unknown font Arial,normal,normal so defaulted font to any
[ERROR] unknown font Arial,normal,normal so defaulted font to any
[ERROR] unknown font Arial,normal,normal so defaulted font to any
[ERROR] unknown font Arial,normal,normal so defaulted font to any
[ERROR] unknown font Arial,normal,normal so defaulted font to any
[ERROR] unknown font Arial,normal,normal so defaulted font to any

i.e it is not registered with fop

how can i solve this issue?\

Thank you very much.
 
No one can make you feel inferior without your consent - Eleanor Roosevelt. tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic