![]() |
Base64 Image works in Designer, but not WS |
Post Reply
|
| Author | |
Alexandru
Newbie
Joined: 03 Oct 2011 Posts: 7 |
Post Options
Quote Reply
Topic: Base64 Image works in Designer, but not WSPosted: 21 Oct 2011 at 1:57pm |
|
In the designer I was able to insert a new image producing the following definition in my XFD file:
<xfd:attribute-value object="16B8637C" attribute="fo:src" dynamic-value="/document/metadata/logo"/> <fo:external-graphic src="" content-width="scale-to-fit" content-height="scale-to-fit" scaling="uniform" id="16B8637C"/></fo:block> Clicking on the PDF preview button produces the correct PDF output with images included. However, after exporting the XFD to XSL, and sending it over SOAP to the Ecrion WS - I get the PDF but without images. In both cases the same content XML is used. Here is a snippet from the generated XSL mentioned above: <fo:external-graphic src="url()" content-width="scale-to-fit" content-height="scale-to-fit" scaling="uniform" id="16B8637C"> <xslt:attribute name="xf:compat-id">id1689573<xslt:value-of select="generate-id(.)"/> </xslt:attribute> <xslt:attribute name="id">16B8637C</xslt:attribute> <xsl:attribute name="src"> <xsl:value-of select="/document/metadata/logo"/> </xsl:attribute> </fo:external-graphic> Replacing the xsl:value-of line with this works: <xsl:value-of select="concat('url(data:image/jpg;base64,',/document/metadata/logo,')')"/> How can I get the XF designer to automatically generate the required "url()" wrapper and perhaps also the "data:image/jpg;base64" prefix as well without having to modify the exporting XSL file in order to get images working. Thank you very much for the help. |
|
![]() |
|
radup
Admin Group
Adminstrator Joined: 19 May 2008 Posts: 83 |
Post Options
Quote Reply
Posted: 24 Oct 2011 at 3:16am |
|
Hi Alexandru,
Change the xpath of the dynamic value to: concat('url(data:image/jpg;base64,',/document/metadata/logo,')'). And, it looks like this:
|
|
![]() |
|
Post Reply
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |