Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Path for images in xsl:fo

 
Ajit Kanada
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am using xsl to convert HTML to PDF .Here if i have images in HTML i have to give absolute path whle creating PDF using appche.orgs tool.
Relative path is not working..What can be the problem...
Doses xsl:fo doesnt accept relative path for PDF conversion?
Any help....

Regards
Ajit
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ajit Kanada:
Hi
I am using xsl to convert HTML to PDF .Here if i have images in HTML i have to give absolute path whle creating PDF using appche.orgs tool.
Relative path is not working..What can be the problem...
Doses xsl:fo doesnt accept relative path for PDF conversion?
Any help....
Regards
Ajit

Yes you need to give only absolute path if you are running from web server.Fop searches image relative to current jvm directory (user.dir property) and then relative to baseDir property.
For command prompt,it is enough if you place images in xsl files directory.

The good way could be use
1.Set Basedir in userconfig.xml file.
2.Or use Configuration class and Configuration.put("baseDir", "C:/images/") in your java code, please check docs on doing this.I didn't tried yet.
3.you can use an xsl file to have a xsl:variable baseDir and import it to your main xsl file,this will help you for easy shifting.
Regards
balaji
[ December 03, 2002: Message edited by: Balaji Loganathan ]
[ December 03, 2002: Message edited by: Balaji Loganathan ]
 
Ajit Kanada
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx balaji
I ll make the changes and see..
Regards
Ajit
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic