Hi everyone,
I am trying to convert a textfile eventually to a pdf file with a visualization of information in the text file.
I use Java to convert the text file to an xml file, and fop to convert the xml together with an xsl file to a pdf containing svg images.
I'm almost finished and I'm down to the last hurdle. Putting the image pointed by a filename into the svg image. At this point I'm stuck with two problems:
1. The text files can be generated by 2 different applications. For the first application the filename works fine. But when executing on a file generated by the second application it fails with the error:
The URI "c://\test_image.tiff" on element <image> can't be opened because:
The URI can't be opened:
Unable to make sense of URL for connection
When I watch the original textfile and the xml file, the path looks like: c:\test_image.tiff. I can't see any distinction between the paths from both applications.
Can someone explain where the // in the filename from the error come from (because I think there's the problem), and how I can get rid of them?
2. I want to show the image (pointed by the filename) inside my svg image. But I need to rotate the image 90 degrees. I managed to do that, but then the image isn't the right size anymore.
I suspect that the image is placed in the svg, and scaled to fit the view, and when rotated, doesn't alter it's size anymore.
Here is the code to display the image:
<!-- Draw Bitmap -->
<svg:g transform="rotate({$bitmap_rotation}, {$width_middle}, {$height_middle})">
<svg:g transform="translate({$svg_bitmap_width_offset},{$svg_bitmap_height_offset})">
<svg:image width="{$svg_bitmap_width}" height="{$svg_bitmap_height}" xlink:href="{$bitmap_path}">
<svg:title>Front Bitmap</svg:title>
</svg:image>
</svg:g>
</svg:g>
All the variables are determined somewhere else from the xml input.
Can someone help me to get the image at the correct size?
Thanks in advance,
miepmuts