Barry:

No problem.  In case you need it, I have attached some code that we used for a fake watermark on some of our official documents.  It is not transparent, but it got the job done.  Just FYI.

First, the call (it can be any region):

<fo:page-sequence master-reference="generic" language="en" country="us">
        <fo:static-content flow-name="xsl-region-before">
                <fo:block-container position="absolute" top="10mm" left="1mm" height="70mm" width="230mm">
                        <xsl:call-template name="showWatermark">
                                <xsl:with-param name="watermarkText"><xsl:apply-templates select="statusText"/></xsl:with-param>
                        </xsl:call-template>
                </fo:block-container>
<!--  and the code goes on...-->

Now the template (you can swap out the text tag for any svg tag):

        <xsl:template name="showWatermark">
                <xsl:param name="watermarkText"></xsl:param>
                <fo:block text-align="center">
                        <fo:instream-foreign-object xmlns:svg="http://www.w3.org/2000/svg">
                                <svg:svg width="285" height="70">
                                        <svg:g transform="rotate(-5)">
                                                        <svg:text x="10" y="60" style="font-family:Courier;font-size:40;font-weight:normal;stroke-width:0.5;fill:none;stroke:lightgray;stroke-opacity:0.75;"><xsl:value-of select="$watermarkText"/></svg:text>
                                        </svg:g>
                                </svg:svg>
                        </fo:instream-foreign-object>
                </fo:block>
        </xsl:template>

-Lou

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LOG-NET, Inc.
The Logistics Network Management System
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
230 Half Mile Road
Third Floor
Red Bank, NJ 07701
PH: 732-758-6800
FAX: 732-747-7497
http://www.LOG-NET.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CONFIDENTIAL & PRIVILEGED
Unless otherwise indicated or if obvious from the nature of the content, the information contained herein is privileged and confidential information/work product. The communication is intended for the use of the individual or entity named above.  If the reader of this transmission is not the intended recipient, you are  hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.  If you have received this communication in error, please notify the sender immediately by telephone (732-758-6800) or by electronic mail ([EMAIL PROTECTED]), and destroy any copies, electronic, paper or otherwise, which you may have of this communication.  Thank you.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



"Barry Whiting" <[EMAIL PROTECTED]>

10/18/2006 05:39 AM

Please respond to
[email protected]

To
<[email protected]>
cc
Subject
RE: Embeded svg files





Hi Louis
 
Thanks for the response but this wont work for me Im afraid.
 
First the image is set in the region-body and it’s a vector graphic that we use for a background.
 
Sorry for the confusion that’s my fault.
 
Kind regards
 
Barry
 



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent:
17 October 2006 16:38
To:
[email protected]
Subject:
Re: Embeded svg files

 

I do this in 0.20.3 for all of our images.  Here is a sample code block that puts a basic shipping mark on a report:


       <fo:block text-align="center">

               <fo:instream-foreign-object xmlns:svg="http://www.w3.org/2000/svg">

                       <svg:svg width="96.4" height="51">

                               <svg:g stroke="black">

                                       <svg:line x1="2" y1="37.8" x2="94.4" y2="37.8" stroke-width="1"/>

                                       <svg:line x1="94.4" y1="37.8" x2="81.8" y2="0" stroke-width="1"/>

                                       <svg:line x1="81.8" y1="0" x2="14.6" y2="0" stroke-width="1"/>

                                       <svg:line x1="14.6" y1="0" x2="2" y2="37.8" stroke-width="1"/>

                                       <svg:text x="22" y="20" font-family="sans-serif" font-size="7pt" style="fill:black">See Instructions</svg:text>

                               </svg:g>

                       </svg:svg>

               </fo:instream-foreign-object>

       </fo:block>


This renders fine in PDF, but to see something like this in IE 5/6, you will need a plugin (go to Adobe).


-Lou



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LOG-NET, Inc.
The Logistics Network Management System
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
230 Half Mile Road
Third Floor
Red Bank, NJ 07701
PH: 732-758-6800
FAX: 732-747-7497
http://www.LOG-NET.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CONFIDENTIAL & PRIVILEGED
Unless otherwise indicated or if obvious from the nature of the content, the information contained herein is privileged and confidential information/work product. The communication is intended for the use of the individual or entity named above.  If the reader of this transmission is not the intended recipient, you are  hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.  If you have received this communication in error, please notify the sender immediately by telephone (732-758-6800) or by electronic mail ([EMAIL PROTECTED]), and destroy any copies, electronic, paper or otherwise, which you may have of this communication.  Thank you.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

"Barry Whiting" <[EMAIL PROTECTED]>

10/17/2006 11:31 AM


Please respond to
[email protected]


To
<[email protected]>
cc
 
Subject
Embeded svg files

 


   





Hi

 
I wondered if someone could help please.

 
I am able to embed jpg files with no problems at all in my fo file using
http://someserver.com/images/someimage.jpg but when I try to embed a svg file it doesn’t work at all but I don’t get any errors at all
 
Im using fop 0.20.5

 
Thanks for any help any one can give

 
Regards

 
Barry

Reply via email to