[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] resend--problem with adding a watermark to PDF using X
Yestereday, I sent an email to our mailing list fo rhelp and have not got response yet. I have to resend this and hopefully someone can help me with this. thanks, Dave Hi, I am new to XSL. Can anyone give me some advice? I will appreciate it. I have problem with displaying the watermark on the background of my PDF using XSL. I'd like to add a watermark to my three PDF(Originally these 3 PDF come from a multipage tiff image and I used FOP and JAI to extract it and convert them into PDF). When I view in browser, the warermark seemed to appear first on the page and soon moved to the bottom of each page. It seems like when the XSL tries to load the watermark image as a background, but in the same time, the PDF is also being loaded. So, the PDF takes page space and push the watermark down to the bottom of the page. So, the watermark is always at the page bottom. Is there any way I can solve this problem. Your suggestion will be greatly appreciated. I attached my XSL file for your reference. Is there anyting wrong with my XSL file, especially within the tag <fo:flow flow-name="xsl-region-body">? Many thanks for your help, Dave ***************************** <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="fo"> <!--<xsl:variable name="image" select="'parameter not set'"/>--> <xsl:param name="image0" select="'parameter not set'"/> <xsl:param name="image1" select="'parameter not set'"/> <xsl:param name="image2" select="'parameter not set'"/> <xsl:template match="/"> <fo:root font-family="Times Roman" font-size="12pt" text-align="center" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <fo:simple-page-master margin-right="1.5cm" margin-left="1.5cm" margin-bottom="2cm" margin-top="1cm" page-width="21cm" page-height="29.7cm" master-name="left"> <fo:region-body margin-top="1cm" margin-bottom="1cm"> <xsl:attribute name="background-image"> <xsl:text>file:///c:/SampleImage/watermark.jpg</xsl:text> </xsl:attribute> </fo:region-body> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence id="N2528" master-reference="left"> <fo:static-content flow-name="xsl-region-after"> <fo:block text-align-last="center" font-size="10pt"> <fo:page-number/> </fo:block> </fo:static-content> <!-- anything wrong with "xsl-region-body"? because the watermark(watermark.jpg) is also displayed in xsl-region-body--> <fo:flow flow-name="xsl-region-body"> <fo:block> <fo:external-graphic width="auto" height="auto" overflow="hidden" src="url('{$image0}')"/> </fo:block> <fo:block> <fo:external-graphic width="auto" height="auto" overflow="hidden" src="url('{$image1}')"/> </fo:block> <fo:block> <fo:external-graphic width="auto" height="auto" overflow="hidden" src="url('{$image2}')"/> </fo:block> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> </xsl:stylesheet> ******************************** ________________________________________________ Get your own "800" number Voicemail, fax, email, and a lot more http://www.ureach.com/reg/tag
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|