aspose file tools*
The moose likes XML and Related Technologies and the fly likes Path for images in xsl:fo Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Path for images in xsl:fo" Watch "Path for images in xsl:fo" New topic
Author

Path for images in xsl:fo

Ajit Kanada
Ranch Hand

Joined: Jan 23, 2001
Posts: 95
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


Thankx
Ajit
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
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 ]

Spritle Software Blogs
Ajit Kanada
Ranch Hand

Joined: Jan 23, 2001
Posts: 95
Thanx balaji
I ll make the changes and see..
Regards
Ajit
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Path for images in xsl:fo