You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Tim Bachta <tb...@kopent.com> on 2003/05/14 20:22:03 UTC

Rendering an image in a pdf file

I am having trouble putting an image in a PDF file.  Has anyone done
this before?  Here is the code from my XSL that I am using.

 

<?xml version="1.0"?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">

       

<xsl:template match="page">

       <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

             <fo:layout-master-set>

                    <fo:simple-page-master master-name="page"
page-height="11in" page-width="8.5in">

                           <fo:region-body region-name="xsl-region-body"
margin="0.7in" />

                           <fo:region-before
region-name="xsl-region-before" extent="0.7in" />

                           <fo:region-after
region-name="xsl-region-after" extent="0.7in" />

                    </fo:simple-page-master>

                    

                    

             </fo:layout-master-set>

             

             <fo:page-sequence master-reference="page">

                    <fo:static-content flow-name="xsl-region-before">

                           <fo:block><fo:external-graphic
src="images/Vyzo_logo_small.jpg" 

                           content-height="100%" scaling="uniform"/>

                           </fo:block>

                                                </fo:static-content> 

... and so on

 

 

any help would be greatly appreciated.

 

Tim


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


Re: Rendering an image in a pdf file

Posted by Joerg Heinicke <jo...@gmx.de>.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15316

Joerg

> <fo:static-content flow-name="xsl-region-before">
>   <fo:block>
>     <fo:external-graphic src="images/Vyzo_logo_small.jpg" content-height="100%" scaling="uniform"/>
>   </fo:block>
> </fo:static-content> 

PS: Please don't use tabs for indenting.


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


RE: Rendering an image in a pdf file

Posted by Hugo Burm <hu...@xs4all.nl>.
Sorry for following up on my own message, but I forgot to mention something
that may appear obvious:
If the .png (or .jpg etc.) is located within the realm covered by cocoon, it
must be matched in the sitemap by a map:read, or you will get an error like
"resource not found". See the examples how to include a gif image in your
html.

Hugo

-----Original Message-----

Use the full pathname for the src attribute in your fo:external-graphic
element.

This is working for me:
<fo:block>
  <fo:external-graphic content-type="png" width="240px"
src="http://localhost:8080/cocoon/dg/ima/test.png" /></fo:block>

Hugo Burm


-----Original Message-----
From: Tim Bachta [mailto:tbachta@kopent.com]
Sent: Wednesday, May 14, 2003 8:22 PM
To: cocoon-users@xml.apache.org
Subject: Rendering an image in a pdf file

I am having trouble putting an image in a PDF file.  Has anyone done
this before?  Here is the code from my XSL that I am using.

[code from original message deleted, not well formatted]


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



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


RE: Rendering an image in a pdf file

Posted by Hugo Burm <hu...@xs4all.nl>.
Use the full pathname for the src attribute in your fo:external-graphic
element.

This is working for me:
<fo:block>
  <fo:external-graphic content-type="png" width="240px"
src="http://localhost:8080/cocoon/dg/ima/test.png" /></fo:block>

Hugo Burm


-----Original Message-----
From: Tim Bachta [mailto:tbachta@kopent.com]
Sent: Wednesday, May 14, 2003 8:22 PM
To: cocoon-users@xml.apache.org
Subject: Rendering an image in a pdf file

I am having trouble putting an image in a PDF file.  Has anyone done
this before?  Here is the code from my XSL that I am using.

[code from original message deleted, not well formatted]


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


Modular Database Actions

Posted by Chris <ch...@yahoo.com>.
Is anybody using the Modular Database Actions
in cocoon 2.0.x in a production environment?

The 2.0.4 scratchpad examples seem to work well.

thanks,

chris

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