Ecrion Software Inc. Homepage
Forum Home Forum Home > XF Rendering Server > XSL-FO
  New Posts New Posts RSS Feed: Wmf In Xsl, How To Display ?
  FAQ FAQ  Forum Search   Register Register  Login Login

Wmf In Xsl, How To Display ?

 Post Reply Post Reply
Author
Message / View First Unread Post
falik View Drop Down
Newbie
Newbie


Joined: 13 Oct 2011
Posts: 10
Post Options Post Options   Quote falik Quote  Post ReplyReply Direct Link To This Post Topic: Wmf In Xsl, How To Display ?
    Posted: 13 Oct 2011 at 9:24am

Hello there, it's my first post on this forum :)


Here's the problem I'm facing: I've got some xml files in which there are wmf images that I have to display using XSL-FO in my pdf. The problem is that those images are encoded somehow and I don't know what the code is.


It's a sample tag of this image:



<object ident="eqwrd_1" skaluj="1" wys="24.9pt" szer="16.0pt" typ="WMF">

<object-projection>D7CDC69A00000000000034027003030900000000565F010009000003d100000002001c00000000000500000009020000000005000000020101000000050000000102ffffff000

50000002e0118000000050000000b0200000000050000000c02200300021200000026060f001a00ffffffff000010000000c0ffffffa9ffffffc0010000c90200000b00000026060f000c004d617468

54797065000060001c000000fb0220ff0000000000009001000000000402001054696d6573204e657720526f6d616e0040adf37749adf3772040f577d31566a8040000002d0100000800000

0320a0201bd00010000005e7908000000320ac0020d010100000030791c000000fb0280fe0000000000009001010000a10402001054696d6573204e657720526f6d616e0040adf37749adf3

772040f577d31566a8040000002d01010004000000f001000008000000320a6002340001000000e1790a00000026060f000a00ffffffff0100000000001c000000fb021000070000000000bc02

000000ee0102022253797374656d00a8d31566a800000a0021008a0100000000000000005cf31200040000002d01000004000000f0010100030000000000</object-projection></object>


I found some ways of displaying images encoded in base64 in some RFC's by using this: "data:image;base64,[some base64 code]" as an url.

The problem is that the images that I've got to display are not encoded in base64 and I got no idea what to do with them to make them apear in my pdf :(:(

The code looks like some hexadecimals but I haven't come across with something like that before in encoding images. If some one of U people got any idea how to display this image, or how to convert this code, or maybe what this code could be :), I would be grateful.

Back to Top
radup View Drop Down
Admin Group
Admin Group
Avatar
Adminstrator

Joined: 19 May 2008
Posts: 90
Post Options Post Options   Quote radup Quote  Post ReplyReply Direct Link To This Post Posted: 13 Oct 2011 at 10:23am
The object_projection contains the image bytes encoded in HEX.
You can decode your image directly to base64 here http://home2.paulschou.net/tools/xlate/
The image base64 encoded in xsl-fo will be:
<fo:external-graphic src="url(data:;base64,183GmgAAAAAAADQCcAMDCQAAAABWXwEACQAAA9EAAAACABwAAAAAAAUAAAAJAgAAAAAFAAAAAgEBAAAABQAAAAEC////AAUAAAAuARgAAAAFAAAACwIAAAAABQAAAAwCIAMAAhIAAAAmBg8AGgD/////AAAQAAAAwP///6n////AAQAAyQIAAAsAAAAmBg8ADABNYXRoVHlwZQAAYAAcAAAA+wIg/wAAAAAAAJABAAAAAAQCABBUaW1l
cyBOZXcgUm9tYW4AQK3zd0mt83cgQPV30xVmqAQAAAAtAQAACAAAADIKAgG9AAEAAABeeQgAAAAyCsACDQEBAAAAMHkcAAAA+wKA/gAAAAAAAJABAQAAoQQCABBUaW1lcyBOZXcgUm9tYW4AQK3zd0mt83cgQPV30xVmqAQAAAAtAQEABAAAAPABAAAIAAAAMgpgAjQAAQAAAOF5CgAAACYGDwAKAP////8BAAAAAAAcAAAA+wIQAAcAAAAAALw
CAAAA7gECAiJTeXN0ZW0AqNMVZqgAAAoAIQCKAQAAAAAAAAAAXPMSAAQAAAAtAQAABAAAAPABAQADAAAAAAA=)" content-width="1.466in" content-height="2.288in" scaling="uniform"/>


Edited by radup - 13 Oct 2011 at 10:24am
Back to Top
falik View Drop Down
Newbie
Newbie


Joined: 13 Oct 2011
Posts: 10
Post Options Post Options   Quote falik Quote  Post ReplyReply Direct Link To This Post Posted: 13 Oct 2011 at 10:43am
Thank you very much for such a quick answer.

I thought of transforming those hex into base64 but haven't got any software for that so thanks for that website, it's nice.

Here comes another question: is there a way to display an image using FO which is encoded in hex without translating it to base64 ? My problem is that I'm supposed to find a way to do this only using xslt and xsl-fo, of course if it's possible :) 




Edited by falik - 13 Oct 2011 at 10:45am
Back to Top
radup View Drop Down
Admin Group
Admin Group
Avatar
Adminstrator

Joined: 19 May 2008
Posts: 90
Post Options Post Options   Quote radup Quote  Post ReplyReply Direct Link To This Post Posted: 13 Oct 2011 at 10:50am
I'm afraid is not, but I think we can implement this automatic decoding as custom development.
If you are interested please send us an email to support@ecrion.com.

Regards,
Radu
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.69
Copyright ©2001-2010 Web Wiz

This page was generated in 0.141 seconds.