You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Kishore Janga <ja...@ociweb.com> on 2007/04/19 18:13:37 UTC

Problem with FOP while exposing the generated images

I need to display the images on pdf document. I am using FOP 0.20 for 
generating the pdf documents. In order to display the image, i had to 
write an Xalan Java Extension to decode the base 64 data and create an 
image on file system. This extension returns the absolute path for the 
image. Following is my snippet of xslt for the same...

<fo:table-cell padding-top="0.05cm" padding-left="0.07cm">
       <fo:block text-align="left" border-bottom-style="solid"
                   border-bottom-width="0.02cm" font-weight="bold">
                                                      <xsl:variable 
name="signature" select="//recipient//encodedBytes"/>
       <xsl:variable name="sign" 
select="converter:ConversionHelper.getDecodedData($signature)"/>
       <fo:external-graphic src="{$sign}"
                        content-width="50px" content-height="7px"/>
       </fo:block>
</fo:table-cell>

The above code works fine on Windows. This generates the images and the 
same are being shown on the PDF.

Problem is that on UNIX, this extension creates the image successfully. 
But cannot display on PDF document. Even if I create the image on window 
thru the extension and FTP to UNIX and use the same image on external 
graphic, it cannot display the image on PDF. If I save the generated 
image on windows to another extension or copy to different name and FTP 
to UNIX and use that in external graphic, that would show clearly. Did 
any one see this problem before?

Thanks,
Kishore.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Problem with FOP while exposing the generated images

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Why so complicated? Why don't you just use RFC2397 data URLs? There is
support for them built-in to FOP 0.93, and for FOP 0.20.5 you'll find an
add-on on the fop-users mailing list archives.

On 19.04.2007 18:13:37 Kishore Janga wrote:
> I need to display the images on pdf document. I am using FOP 0.20 for 
> generating the pdf documents. In order to display the image, i had to 
> write an Xalan Java Extension to decode the base 64 data and create an 
> image on file system. This extension returns the absolute path for the 
> image. Following is my snippet of xslt for the same...
> 
> <fo:table-cell padding-top="0.05cm" padding-left="0.07cm">
>        <fo:block text-align="left" border-bottom-style="solid"
>                    border-bottom-width="0.02cm" font-weight="bold">
>                                                       <xsl:variable 
> name="signature" select="//recipient//encodedBytes"/>
>        <xsl:variable name="sign" 
> select="converter:ConversionHelper.getDecodedData($signature)"/>
>        <fo:external-graphic src="{$sign}"
>                         content-width="50px" content-height="7px"/>
>        </fo:block>
> </fo:table-cell>
> 
> The above code works fine on Windows. This generates the images and the 
> same are being shown on the PDF.
> 
> Problem is that on UNIX, this extension creates the image successfully. 
> But cannot display on PDF document. Even if I create the image on window 
> thru the extension and FTP to UNIX and use the same image on external 
> graphic, it cannot display the image on PDF. If I save the generated 
> image on windows to another extension or copy to different name and FTP 
> to UNIX and use that in external graphic, that would show clearly. Did 
> any one see this problem before?
> 
> Thanks,
> Kishore.


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org