Re: [FOP] Watermark does not overlay over text

2015-07-03 Thread Pascal Sancho
Hi,

To do so, one solution is to output your doc in IF format, add missing
watermarks on every page, and re-inject the IF to FOP, that should do
the trick.
Read [1] for further info.

[1] http://xmlgraphics.apache.org/fop/2.0/intermediate.html#usage-if


2015-07-02 1:18 GMT+02:00 Puja Jain pujajai...@gmail.com:
 Thanks for the reply Chris.

 I have tried putting the watermark in the body as suggested and it works,
 but I would like the watermark to appear on every page. Is there any way to
 force the block to appear on every page at a fixed position?

 What Im trying to achieve is an image watermark that will be rendered on top
 of contents on every pdf page at a fixed position. I have tried rendering it
 as a background image in the region-* but they all result in the same
 overlay issue. So although adding it at the end of the body contents works
 but it just appears on one page.



 --
 View this message in context: 
 http://apache-fop.1065347.n5.nabble.com/FOP-Watermark-does-not-overlay-over-text-tp42498p42511.html
 Sent from the FOP - Users mailing list archive at Nabble.com.

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




-- 
pascal

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



Re: [FOP] Watermark does not overlay over text

2015-07-02 Thread Puja Jain
Thanks for the reply Chris. 

I have tried putting the watermark in the body as suggested and it works,
but I would like the watermark to appear on every page. Is there any way to
force the block to appear on every page at a fixed position? 

What Im trying to achieve is an image watermark that will be rendered on top
of contents on every pdf page at a fixed position. I have tried rendering it
as a background image in the region-* but they all result in the same
overlay issue. So although adding it at the end of the body contents works
but it just appears on one page.



--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/FOP-Watermark-does-not-overlay-over-text-tp42498p42511.html
Sent from the FOP - Users mailing list archive at Nabble.com.

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



Re: [FOP] Watermark does not overlay over text

2015-07-01 Thread Chris Bowditch

Hi Puja,

Put the block-container into the body region after the text to overlay. 
FOP renders block-container's in the order it encounters them in the 
XXSL-FO. region-* are always rendered before the body, so the body 
contents will always overlay any block-containers placed in region-*


Thanks,

Chris

On 30/06/2015 15:13, Puja Jain wrote:
I’m trying to overlay a watermark over text by placing the watermark 
in fo:region-after as per the FOP documentation in 
https://xmlgraphics.apache.org/fop/0.95/output.html. But the watermark 
is always rendered under the text. How can I get the watermark to 
overlay over the text?


Here’s the code snippet:

?xml version=1.0?
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
  fo:layout-master-set
  fo:simple-page-master
  master-name=A4 margin-top=1.5cm margin-bottom=1.5cm
  margin-left=1.25cm margin-right=1cm
  fo:region-body /
  fo:region-after extent=11in/
  /fo:simple-page-master
  /fo:layout-master-set

 fo:page-sequence master-reference=A4
  fo:static-content flow-name=xsl-region-after
  fo:block-container position=absolute top=80px left=0px
fo:block display-align=center font-weight=bold 
font-size=40pt color=red”Watermark

/fo:block
  /fo:block-container
/fo:static-content


  fo:flow flow-name=xsl-region-body font-size=20pt
  fo:block-container
  fo:block margin-top=0pxThis text should appear under the 
watermark

  /fo:block
  /fo:block-container
  /fo:flow
/fo:page-sequence

Thanks,
Puja



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



Re: Add Watermark to PDF file

2010-07-15 Thread Hammet

I usually use V http://geovid.com/VidLogo/ idLogo   to add watermark to gif.
-- 
View this message in context: 
http://old.nabble.com/Add-Watermark-to-PDF-file-tp20662292p29171885.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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



Re: Add Watermark to PDF file

2008-11-24 Thread Sebastien
Hi,
http://xmlgraphics.apache.org/fop/0.95/output.html#pdf-watermark
It should help you ;)


On Mon, Nov 24, 2008 at 3:48 PM, Ashish Kulkarni 
[EMAIL PROTECTED] wrote:

 Hi

 How can i add watermark to a PDF file, i have to create a Purchase Order
 PDF, where i want the status of PDF like Approved, unapproved as watermark
 of this PDF file

 How can i do so using FOP

 Ash



Re: Add Watermark to PDF file

2008-11-24 Thread Tobias van Treeck
I don't know if that's possible with FOP.
But you can use iText to easily add a watermark to an (existing) pdf.

1. GenerateFOP to generate a pdf
2. Use iText to add watermark

http://itextdocs.lowagie.com/tutorial/general/copystamp/index.php

Regards,
ToM

 Hi

 How can i add watermark to a PDF file, i have to create a Purchase
 Order
 PDF, where i want the status of PDF like Approved, unapproved as
 watermark
 of this PDF file

 How can i do so using FOP

 Ash


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: XMP - iText - Watermark Problem

2008-10-29 Thread Jeremias Maerki
Looks like a bug in the JAXP/XSLT (javax.xml.transform) implementation
you're using. The namespace declarations are not properly generated.
Please use a recent Xalan-J or SAXON. See here for instructions:
http://xml.apache.org/xalan-j/faq.html#faq-N100EF

On 29.10.2008 13:26:22 Tobias van Treeck wrote:
 Hi,
 
 i generate a pdf with fop and afterwards i add a watermark. Until i
 didn't set the following meta data
 
 this.foUserAgent.setCreator(Creator);
 this.foUserAgent.setAuthor(Author);
 this.foUserAgent.setTitle(Title);
 
  it worked but now i get the following message:
 
 The prefix x for element x:xmpmeta is not bound.
 After looking into the PDF i realized that the namespace is not set and
 that's why iText runs into problems:
 
 x:xmpmeta
 rdf:RDF
 rdf:Description rdf:about=
 pdf:PDFVersion1.4/pdf:PDFVersion
 pdf:ProducerApache FOP Version 0.95/pdf:Producer
 /rdf:Description
 rdf:Description rdf:about=
 xmp:CreatorToolCreator/xmp:CreatorTool
 xmp:CreateDate2008-10-29T10:38:07+01:00/xmp:CreateDate
 /rdf:Description
 rdf:Description rdf:about=
 dc:date
 rdf:Seq
 rdf:li2008-10-29T10:38:07+01:00/rdf:li
 /rdf:Seq
 /dc:date
 dc:creator
 rdf:Seq
 rdf:liAuthor/rdf:li
 /rdf:Seq
 /dc:creator
 dc:title
 rdf:Alt
 rdf:li xml:lang=x-defaultTitle/rdf:li
 /rdf:Alt
 /dc:title
 /rdf:Description
 /rdf:RDF
 /x:xmpmeta
 ?xpacket end=r?
 
 So can i add the namespace manually or is that just a bug of FOP?
 I know that i can set the xmp part manually with fo:declarations but i
 don't want to do that...
 
 Regards,
 ToM
 
 




Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



XMP - iText - Watermark Problem

2008-10-29 Thread Tobias van Treeck
Hi,

i generate a pdf with fop and afterwards i add a watermark. Until i
didn't set the following meta data

this.foUserAgent.setCreator(Creator);
this.foUserAgent.setAuthor(Author);
this.foUserAgent.setTitle(Title);

 it worked but now i get the following message:

The prefix x for element x:xmpmeta is not bound.
After looking into the PDF i realized that the namespace is not set and
that's why iText runs into problems:

x:xmpmeta
rdf:RDF
rdf:Description rdf:about=
pdf:PDFVersion1.4/pdf:PDFVersion
pdf:ProducerApache FOP Version 0.95/pdf:Producer
/rdf:Description
rdf:Description rdf:about=
xmp:CreatorToolCreator/xmp:CreatorTool
xmp:CreateDate2008-10-29T10:38:07+01:00/xmp:CreateDate
/rdf:Description
rdf:Description rdf:about=
dc:date
rdf:Seq
rdf:li2008-10-29T10:38:07+01:00/rdf:li
/rdf:Seq
/dc:date
dc:creator
rdf:Seq
rdf:liAuthor/rdf:li
/rdf:Seq
/dc:creator
dc:title
rdf:Alt
rdf:li xml:lang=x-defaultTitle/rdf:li
/rdf:Alt
/dc:title
/rdf:Description
/rdf:RDF
/x:xmpmeta
?xpacket end=r?

So can i add the namespace manually or is that just a bug of FOP?
I know that i can set the xmp part manually with fo:declarations but i
don't want to do that...

Regards,
ToM


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: XMP - iText - Watermark Problem

2008-10-29 Thread Tobias van Treeck
Yeah you are right - we are using java 1.4 here and using the endorsed
mechanism it worked.
Unfortunatly in production i can't do that, so is there another way?
Can i set the processor directly in FOP?

...otherwise i gonna try fo:declarations

Thanks
ToM

 Looks like a bug in the JAXP/XSLT (javax.xml.transform) implementation
 you're using. The namespace declarations are not properly generated.
 Please use a recent Xalan-J or SAXON. See here for instructions:
 http://xml.apache.org/xalan-j/faq.html#faq-N100EF

 On 29.10.2008 13:26:22 Tobias van Treeck wrote:
  Hi,
 
  i generate a pdf with fop and afterwards i add a watermark. Until i
  didn't set the following meta data
 
  this.foUserAgent.setCreator(Creator);
  this.foUserAgent.setAuthor(Author);
  this.foUserAgent.setTitle(Title);
 
   it worked but now i get the following message:
 
  The prefix x for element x:xmpmeta is not bound.
  After looking into the PDF i realized that the namespace is not set
  and
  that's why iText runs into problems:
 
  x:xmpmeta
  rdf:RDF
  rdf:Description rdf:about=
  pdf:PDFVersion1.4/pdf:PDFVersion
  pdf:ProducerApache FOP Version 0.95/pdf:Producer
  /rdf:Description
  rdf:Description rdf:about=
  xmp:CreatorToolCreator/xmp:CreatorTool
  xmp:CreateDate2008-10-29T10:38:07+01:00/xmp:CreateDate
  /rdf:Description
  rdf:Description rdf:about=
  dc:date
  rdf:Seq
  rdf:li2008-10-29T10:38:07+01:00/rdf:li
  /rdf:Seq
  /dc:date
  dc:creator
  rdf:Seq
  rdf:liAuthor/rdf:li
  /rdf:Seq
  /dc:creator
  dc:title
  rdf:Alt
  rdf:li xml:lang=x-defaultTitle/rdf:li
  /rdf:Alt
  /dc:title
  /rdf:Description
  /rdf:RDF
  /x:xmpmeta
  ?xpacket end=r?
 
  So can i add the namespace manually or is that just a bug of FOP?
  I know that i can set the xmp part manually with fo:declarations
  but i
  don't want to do that...
 
  Regards,
  ToM
 
 




 Jeremias Maerki


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: XMP - iText - Watermark Problem

2008-10-29 Thread Jeremias Maerki
On 29.10.2008 14:59:43 Tobias van Treeck wrote:
 Yeah you are right - we are using java 1.4 here and using the endorsed
 mechanism it worked.
 Unfortunatly in production i can't do that, so is there another way?
 Can i set the processor directly in FOP?

It's not in FOP, it's in XML Graphics Commons, and no, you can't set
override the processor just for that component. The default
TransformerFactory is used. And if it's Xalan that is used by the
production JRE, putting another Xalan into the classpath won't help
since the one in the JRE takes precedence.

 ...otherwise i gonna try fo:declarations

Won't help you. The XMP in fo:declarations is parsed, optionally merged
with other information and then written out using a Transformer.

 Thanks
 ToM
 
  Looks like a bug in the JAXP/XSLT (javax.xml.transform) implementation
  you're using. The namespace declarations are not properly generated.
  Please use a recent Xalan-J or SAXON. See here for instructions:
  http://xml.apache.org/xalan-j/faq.html#faq-N100EF
 
  On 29.10.2008 13:26:22 Tobias van Treeck wrote:
   Hi,
  
   i generate a pdf with fop and afterwards i add a watermark. Until i
   didn't set the following meta data
  
   this.foUserAgent.setCreator(Creator);
   this.foUserAgent.setAuthor(Author);
   this.foUserAgent.setTitle(Title);
  
    it worked but now i get the following message:
  
   The prefix x for element x:xmpmeta is not bound.
   After looking into the PDF i realized that the namespace is not set
   and
   that's why iText runs into problems:
  
   x:xmpmeta
   rdf:RDF
   rdf:Description rdf:about=
   pdf:PDFVersion1.4/pdf:PDFVersion
   pdf:ProducerApache FOP Version 0.95/pdf:Producer
   /rdf:Description
   rdf:Description rdf:about=
   xmp:CreatorToolCreator/xmp:CreatorTool
   xmp:CreateDate2008-10-29T10:38:07+01:00/xmp:CreateDate
   /rdf:Description
   rdf:Description rdf:about=
   dc:date
   rdf:Seq
   rdf:li2008-10-29T10:38:07+01:00/rdf:li
   /rdf:Seq
   /dc:date
   dc:creator
   rdf:Seq
   rdf:liAuthor/rdf:li
   /rdf:Seq
   /dc:creator
   dc:title
   rdf:Alt
   rdf:li xml:lang=x-defaultTitle/rdf:li
   /rdf:Alt
   /dc:title
   /rdf:Description
   /rdf:RDF
   /x:xmpmeta
   ?xpacket end=r?
  
   So can i add the namespace manually or is that just a bug of FOP?
   I know that i can set the xmp part manually with fo:declarations
   but i
   don't want to do that...
  
   Regards,
   ToM
  
  
 
 
 
 
  Jeremias Maerki
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 




Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: XMP - iText - Watermark Problem

2008-10-29 Thread Tobias van Treeck
Is there a way to disable xmp at all?
Setting the xmp metadata with fo:declarations didn't work - in the
final pdf the namespace is then missing again...

So now i am out of options...
ToM

 Unfortunatly in production i can't do that, so is there another way?
 Can i set the processor directly in FOP?

 ...otherwise i gonna try fo:declarations

 Thanks
 ToM

  Looks like a bug in the JAXP/XSLT (javax.xml.transform)
  implementation
  you're using. The namespace declarations are not properly generated.
  Please use a recent Xalan-J or SAXON. See here for instructions:
  http://xml.apache.org/xalan-j/faq.html#faq-N100EF
 
  On 29.10.2008 13:26:22 Tobias van Treeck wrote:
   Hi,
  
   i generate a pdf with fop and afterwards i add a watermark. Until
   i
   didn't set the following meta data
  
   this.foUserAgent.setCreator(Creator);
   this.foUserAgent.setAuthor(Author);
   this.foUserAgent.setTitle(Title);
  
    it worked but now i get the following message:
  
   The prefix x for element x:xmpmeta is not bound.
   After looking into the PDF i realized that the namespace is not
   set
   and
   that's why iText runs into problems:
  
   x:xmpmeta
   rdf:RDF
   rdf:Description rdf:about=
   pdf:PDFVersion1.4/pdf:PDFVersion
   pdf:ProducerApache FOP Version 0.95/pdf:Producer
   /rdf:Description
   rdf:Description rdf:about=
   xmp:CreatorToolCreator/xmp:CreatorTool
   xmp:CreateDate2008-10-29T10:38:07+01:00/xmp:CreateDate
   /rdf:Description
   rdf:Description rdf:about=
   dc:date
   rdf:Seq
   rdf:li2008-10-29T10:38:07+01:00/rdf:li
   /rdf:Seq
   /dc:date
   dc:creator
   rdf:Seq
   rdf:liAuthor/rdf:li
   /rdf:Seq
   /dc:creator
   dc:title
   rdf:Alt
   rdf:li xml:lang=x-defaultTitle/rdf:li
   /rdf:Alt
   /dc:title
   /rdf:Description
   /rdf:RDF
   /x:xmpmeta
   ?xpacket end=r?
  
   So can i add the namespace manually or is that just a bug of
   FOP?
   I know that i can set the xmp part manually with fo:declarations
   but i
   don't want to do that...
  
   Regards,
   ToM
  
  
 
 
 
 
  Jeremias Maerki
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: XMP - iText - Watermark Problem

2008-10-29 Thread Jeremias Maerki
Not at the moment.

On 29.10.2008 16:16:51 Tobias van Treeck wrote:
 Is there a way to disable xmp at all?
 Setting the xmp metadata with fo:declarations didn't work - in the
 final pdf the namespace is then missing again...
 
 So now i am out of options...
 ToM
 
  Unfortunatly in production i can't do that, so is there another way?
  Can i set the processor directly in FOP?
 
  ...otherwise i gonna try fo:declarations
 
  Thanks
  ToM
 
   Looks like a bug in the JAXP/XSLT (javax.xml.transform)
   implementation
   you're using. The namespace declarations are not properly generated.
   Please use a recent Xalan-J or SAXON. See here for instructions:
   http://xml.apache.org/xalan-j/faq.html#faq-N100EF
  
   On 29.10.2008 13:26:22 Tobias van Treeck wrote:
Hi,
   
i generate a pdf with fop and afterwards i add a watermark. Until
i
didn't set the following meta data
   
this.foUserAgent.setCreator(Creator);
this.foUserAgent.setAuthor(Author);
this.foUserAgent.setTitle(Title);
   
 it worked but now i get the following message:
   
The prefix x for element x:xmpmeta is not bound.
After looking into the PDF i realized that the namespace is not
set
and
that's why iText runs into problems:
   
x:xmpmeta
rdf:RDF
rdf:Description rdf:about=
pdf:PDFVersion1.4/pdf:PDFVersion
pdf:ProducerApache FOP Version 0.95/pdf:Producer
/rdf:Description
rdf:Description rdf:about=
xmp:CreatorToolCreator/xmp:CreatorTool
xmp:CreateDate2008-10-29T10:38:07+01:00/xmp:CreateDate
/rdf:Description
rdf:Description rdf:about=
dc:date
rdf:Seq
rdf:li2008-10-29T10:38:07+01:00/rdf:li
/rdf:Seq
/dc:date
dc:creator
rdf:Seq
rdf:liAuthor/rdf:li
/rdf:Seq
/dc:creator
dc:title
rdf:Alt
rdf:li xml:lang=x-defaultTitle/rdf:li
/rdf:Alt
/dc:title
/rdf:Description
/rdf:RDF
/x:xmpmeta
?xpacket end=r?
   
So can i add the namespace manually or is that just a bug of
FOP?
I know that i can set the xmp part manually with fo:declarations
but i
don't want to do that...
   
Regards,
ToM
   
   
  
  
  
  
   Jeremias Maerki
  
  



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to add watermark

2008-09-28 Thread Jeremias Maerki
There's nothing in XSL-FO to do that. I don't even know if that is
possible in PDF at all.

On 24.09.2008 10:42:48 sushilmuppidi wrote:
 
 I have added water mark as image in pdf. but when i click on the watermark
 image in pdf file, the image being selected and providing the copy option. I
 want to disable copy option of the water mark image.
 Code snippet:  
  fo:simple-page-master master-name=default page-height=29.7cm
 page-width=23cm
   margin-top=11mm margin-bottom=5mm margin-left=23mm
 margin-right=3cm
 fo:region-body 
 background-image=E:\pdfimages\watermark.jpg
 background-repeat=no-repeat
 /fo:region-body 
 fo:region-before region-name=header extent=8in/
   fo:region-after region-name=footer extent=0.5in/
 /fo:simple-page-master
 -- 
 View this message in context: 
 http://www.nabble.com/How-to-add-watermark-tp19644473p19644473.html
 Sent from the FOP - Users mailing list archive at Nabble.com.
 


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to add watermark

2008-09-24 Thread sushilmuppidi

I have added water mark as image in pdf. but when i click on the watermark
image in pdf file, the image being selected and providing the copy option. I
want to disable copy option of the water mark image.
Code snippet:  
 fo:simple-page-master master-name=default page-height=29.7cm
page-width=23cm
margin-top=11mm margin-bottom=5mm margin-left=23mm
margin-right=3cm
  fo:region-body 
  background-image=E:\pdfimages\watermark.jpg
background-repeat=no-repeat  
  /fo:region-body 
  fo:region-before region-name=header extent=8in/
  fo:region-after region-name=footer extent=0.5in/
/fo:simple-page-master
-- 
View this message in context: 
http://www.nabble.com/How-to-add-watermark-tp19644473p19644473.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to add watermark image in center for each page in pdf

2008-09-18 Thread sushilmuppidi

I tried to put image as watermark in pdf. its coming in top of the page. 

I used the below code to get watermark in each page:
  fo:simple-page-master master-name=default page-height=29.7cm
page-width=23cm
margin-top=11mm margin-bottom=5mm margin-left=23mm
margin-right=3cm
 fo:region-body display-align=right
background-image=E:\pdfimages\my1.jpeg  background-repeat=no-repeat
  /fo:region-body 
  fo:region-after region-name=footer extent=0.5in/
/fo:simple-page-master

the image is not coming in center of the page.
how to get the image in center of the page in all the pages.

-- 
View this message in context: 
http://www.nabble.com/How-to-add-watermark-image-in-center-for-each-page-in-pdf-tp19546479p19546479.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to add watermark image in center for each page in pdf

2008-09-18 Thread Pascal Sancho
Hi,

What you need is background-position-horizontal and 
background-position-vertical properties.
There is some limitation when using repeat-*, see [1], but work fine in other 
cases.
[1] 
http://xmlgraphics.apache.org/fop/compliance.html#fo-property-background-position-horizontal
 

Pascal

 -Message d'origine-
 De : sushilmuppidi [mailto:[EMAIL PROTECTED] 
 Envoyé : jeudi 18 septembre 2008 08:00
 À : fop-users@xmlgraphics.apache.org
 Objet : How to add watermark image in center for each page in pdf
 
 
 I tried to put image as watermark in pdf. its coming in top 
 of the page. 
 
 I used the below code to get watermark in each page:
   fo:simple-page-master master-name=default 
 page-height=29.7cm
 page-width=23cm
   margin-top=11mm margin-bottom=5mm margin-left=23mm
 margin-right=3cm
fo:region-body display-align=right
 background-image=E:\pdfimages\my1.jpeg  
 background-repeat=no-repeat
 /fo:region-body 
   fo:region-after region-name=footer extent=0.5in/
 /fo:simple-page-master
 
 the image is not coming in center of the page.
 how to get the image in center of the page in all the pages.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to add watermark image in center for each page in pdf

2008-09-18 Thread sushilmuppidi

HI 
Pascal 

I got the solution from ur suggested link,

Thank u
sushil

Pascal Sancho wrote:
 
 Hi,
 
 What you need is background-position-horizontal and
 background-position-vertical properties.
 There is some limitation when using repeat-*, see [1], but work fine in
 other cases.
 [1]
 http://xmlgraphics.apache.org/fop/compliance.html#fo-property-background-position-horizontal
  
 
 Pascal
 
 -Message d'origine-
 De : sushilmuppidi [mailto:[EMAIL PROTECTED] 
 Envoyé : jeudi 18 septembre 2008 08:00
 À : fop-users@xmlgraphics.apache.org
 Objet : How to add watermark image in center for each page in pdf
 
 
 I tried to put image as watermark in pdf. its coming in top 
 of the page. 
 
 I used the below code to get watermark in each page:
   fo:simple-page-master master-name=default 
 page-height=29.7cm
 page-width=23cm
  margin-top=11mm margin-bottom=5mm margin-left=23mm
 margin-right=3cm
   fo:region-body display-align=right
 background-image=E:\pdfimages\my1.jpeg  
 background-repeat=no-repeat   
/fo:region-body 
   fo:region-after region-name=footer extent=0.5in/
 /fo:simple-page-master
 
 the image is not coming in center of the page.
 how to get the image in center of the page in all the pages.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-add-watermark-image-in-center-for-each-page-in-pdf-tp19546479p19548875.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Watermark is not coming on all pages

2007-08-07 Thread Debasish Jana
Hi:

Need some help related to watermark to appear on all pages, currently, I'm
able to make it appear only on the first page. The relevant xsl:fo tags
follow. I have used a

fo:block break-after=page   /

for forced page break, but after the forced page break, the watermark does
not appear on page2, it appears on page 1 though.
Appreciation in advance.

warm regards,

Debasish
--

fo:flow flow-name=xsl-region-body

  fo:block-container position=absolute
left=0mm top=0mm width=210mm height=297mm

fo:block text-align=center font-size=0mm
  fo:instream-foreign-object width=210mm height=297mm
  svg xmlns=http://www.w3.org/2000/svg;
width=210mm height=297mm
viewBox=0 0 200 200 preserveAspectRatio=none
g transform=translate(10,100)
  g transform=rotate(-25)
text x=0 y=6

style=font-family:Courier;font-size:10;font-weight:normal;stroke-width:0.5
;fill:none;stroke:lightgray;stroke-opacity:0.75;
  WaterMark
/text
  /g
/g
  /svg
  /fo:instream-foreign-object
/fo:block
  /fo:block-container

. . . . . . . . .

fo:block break-after=page   /

/fo:flow

and then I have other fo tags like fo:table


Re: Watermark is not coming on all pages

2007-08-07 Thread Chris Bowditch

Debasish Jana wrote:


Hi:
 
Need some help related to watermark to appear on all pages, currently, 
I'm able to make it appear only on the first page. The relevant xsl:fo 
tags follow. I have used a


fo:block break-after=page   /

for forced page break, but after the forced page break, the watermark 
does not appear on page2, it appears on page 1 though.


A block container placed in the flow will only appear on 1 page. Try 
putting the block-container in a static region instead.


snip/

Chris



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: watermark

2005-10-05 Thread Louis . Masters

Daniel:

I do something like this with SVG to
show the status of the document (draft, final, etc.). However, transparency
is not implemented yet (at least not in 0.20.3) so I have to keep the SVG
very unobtrusive and colorless.

Not sure if this helps much, but here
is some XSL code:

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 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

xsl:template name=showSmallWatermark
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(-3)

   
   svg:text
x=30 y=10 style=font-family:Courier;font-size:30;font-weight:normal;stroke-width:0.5;fill:none;stroke:lightgray;

   
   
   xsl:value-of select=$watermarkText/

   
   /svg:text

   
   /svg:g

   /svg:svg

   /fo:instream-foreign-object
/fo:block
/xsl:template
/xsl:stylesheet


Then, to call it I do something like:

fo:block-container position=absolute
top=10mm left=1mm height=70mm width=230mm
xsl:call-template
name=showWatermark

   xsl:with-param name=watermarkTextxsl:apply-templates
select=statusText//xsl:with-param
/xsl:call-template
/fo:block-container


-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.
~~

Daniel Brown [EMAIL PROTECTED] wrote
on 10/04/2005 17:11:55:

 
 How can I create a watermark? I've read the documentation/FAQ about

 watermarks. I need an Image which will fit being the center of the

 text on the page in the body and continue to remain centered on all

 the following pages in that sequence. 
 
 Thank you, 
 Daniel

Re: watermark

2005-10-05 Thread Louis . Masters

Daniel:

Just stick the template call
into the body flow. For example:

fo:flow flow-name=xsl-region-body
fo:block-container
position=absolute top=10mm left=1mm
height=70mm width=230mm

   xsl:call-template name=showWatermark

   xsl:with-param
name=watermarkTextxsl:apply-templates select=statusText//xsl:with-param

   /xsl:call-template
/fo:block-container
xsl:apply-templates
select=details/data/
fo:block
id=lastpage/fo:block
/fo:flow

Better?

-Lou

Daniel Brown [EMAIL PROTECTED] wrote
on 10/05/2005 08:28:54:

 
 Thanks for your help so far. What I need is actually a watermark 
 which will be centered on all pages in the page sequence. I can get

 a watermark on one page but not in all. Maybe I need to have 
 even/odd pages and have a block in each? 
 
 Daniel 
 
 

 
 [EMAIL PROTECTED] 
 10/05/2005 07:16 AM 
 
 Please respond to
 fop-users@xmlgraphics.apache.org
 
 To
 
 fop-users@xmlgraphics.apache.org 
 
 cc
 
 Subject
 
 Re: watermark
 
 
 
 
 
 Daniel: 
 
 I do something like this with SVG to show the status of the document
 (draft, final, etc.). However, transparency is not implemented
yet 
 (at least not in 0.20.3) so I have to keep the SVG very unobtrusive

 and colorless. 
 
 Not sure if this helps much, but here is some XSL code: 
 
 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 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 
 
 xsl:template name=showSmallWatermark 
 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(-3)

  
 svg:text
x=30 y=10 
 style=font-family:Courier;font-size:30;font-weight:normal;stroke-
 width:0.5;fill:none;stroke:lightgray; 
  
  
  xsl:value-of 
 select=$watermarkText/ 
  
 /svg:text

  
 /svg:g 
  
 /svg:svg 
/fo:instream-foreign-object

/fo:block 
 /xsl:template 
 /xsl:stylesheet 
 
 
 Then, to call it I do something like: 
 
 fo:block-container position=absolute top=10mm
left=1mm 
 height=70mm width=230mm 
xsl:call-template name=showWatermark

xsl:with-param
name=watermarkTextxsl:apply-
 templates select=statusText//xsl:with-param

/xsl:call-template 
 /fo:block-container 
 
 
 -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]
 com), and destroy any copies, electronic, paper or otherwise, which

 you may have of this communication. Thank you.
 ~~ 
 
 Daniel Brown [EMAIL PROTECTED] wrote on 10/04/2005
17:11:55:
 
  
  How can I create a watermark? I've read the documentation/FAQ
about 
  watermarks. I need an Image which will fit being the center of
the 
  text on the page in the body and continue to remain centered
on all 
  the following pages in that sequence. 
  
  Thank you, 
  Daniel 

Re: watermark

2005-10-05 Thread Daniel Brown

Thank you everyone. My solution was
to use iText to add the watermark After the PDF is generated. It's the
cleanest way to do it. If anyone wants any more info on this, let me know.

Regards,

Daniel






[EMAIL PROTECTED]

10/05/2005 08:41 AM



Please respond to
fop-users@xmlgraphics.apache.org





To
fop-users@xmlgraphics.apache.org


cc



Subject
Re: watermark









Daniel: 

Just stick the template call into the body flow. For
example: 

fo:flow flow-name=xsl-region-body

fo:block-container position=absolute
top=10mm left=1mm height=70mm width=230mm

xsl:call-template
name=showWatermark 
  
 xsl:with-param name=watermarkTextxsl:apply-templates
select=statusText//xsl:with-param

/xsl:call-template

/fo:block-container

xsl:apply-templates select=details/data/

fo:block id=lastpage/fo:block

/fo:flow 

Better? 

-Lou 

Daniel Brown [EMAIL PROTECTED] wrote on 10/05/2005 08:28:54:

 
 Thanks for your help so far. What I need is actually a watermark 
 which will be centered on all pages in the page sequence. I can get

 a watermark on one page but not in all. Maybe I need to have 
 even/odd pages and have a block in each? 
 
 Daniel 
 
 

 
 [EMAIL PROTECTED] 
 10/05/2005 07:16 AM 
 
 Please respond to
 fop-users@xmlgraphics.apache.org 
 
 To 
 
 fop-users@xmlgraphics.apache.org 
 
 cc 
 
 Subject 
 
 Re: watermark 
 
 
 
 
 
 Daniel: 
 
 I do something like this with SVG to show the status of the document
 (draft, final, etc.). However, transparency is not implemented
yet 
 (at least not in 0.20.3) so I have to keep the SVG very unobtrusive

 and colorless. 
 
 Not sure if this helps much, but here is some XSL code: 
 
 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 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 
 
 xsl:template name=showSmallWatermark 
 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(-3)

  
 svg:text
x=30 y=10 
 style=font-family:Courier;font-size:30;font-weight:normal;stroke-
 width:0.5;fill:none;stroke:lightgray; 
  
  
  xsl:value-of 
 select=$watermarkText/ 
  
 /svg:text

  
 /svg:g 
  
 /svg:svg 
/fo:instream-foreign-object

/fo:block 
 /xsl:template 
 /xsl:stylesheet 
 
 
 Then, to call it I do something like: 
 
 fo:block-container position=absolute top=10mm
left=1mm 
 height=70mm width=230mm 
xsl:call-template name=showWatermark

xsl:with-param
name=watermarkTextxsl:apply-
 templates select=statusText//xsl:with-param

/xsl:call-template 
 /fo:block-container 
 
 
 -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]
 com), and destroy any copies, electronic, paper or otherwise, which

 you may have of this communication. Thank you.
 ~~ 
 
 Daniel Brown [EMAIL PROTECTED] wrote on 10/04/2005
17:11:55:
 
  
  How can I create a watermark? I've read the documentation/FAQ
about 
  watermarks. I need an Image which will fit being the center of
the 
  text on the page in the body and continue to remain centered
on all 
  the following pages in that sequence. 
  
  Thank you, 
  Daniel 


watermark

2005-10-04 Thread Daniel Brown

How can I create a watermark? I've read
the documentation/FAQ about watermarks. I need an Image which will fit
being the center of the text on the page in the body and continue to remain
centered on all the following pages in that sequence.

Thank you,
Daniel

Re: watermark

2005-10-04 Thread Glen Mazza

Daniel Brown wrote:



How can I create a watermark? I've read the documentation/FAQ about 
watermarks. I need an Image which will fit being the center of the text 
on the page in the body and continue to remain centered on all the 
following pages in that sequence.




I'm not sure of FOP's capabilities in this regard, and the European 
committers who do know are probably counting sheep right now, but 
watermark is highly searchable:


http://marc.theaimsgroup.com/?l=fop-userw=2r=1s=watermarkq=b

Glen

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Next realease and watermark

2005-05-10 Thread Chris Bowditch
Zdenek Machac wrote:
Halo,
FOP is very great and interesting application and is core of our web
server (univerzity intranet). I have only two questions:
1) Are there any plans or dates for next release of FOP ?
FOP is an open source project and developed by volunteers who dont work to 
deadlines. So no fixed date. I expect that there will be a development release 
before the end of the year.

2) In our univerzity we have producting and testing web server. Users
can test application on testing server and we want to mark generated PDF
documents that they aren't valid. Is there way to create watermark on
all pages generated from FOP only by changing some properties in FOP or
changing some class in FOP source code?
Either put a background image into your FO source or add the watermark to the 
generated PDF yourself using a PDF library such as iText.

Chris
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Watermark

2005-04-07 Thread Chris Bowditch
Gang Li wrote:
I made an image with Invalid as the red text in it and it seems 
working now. J Thanks.

 

Another question, does anybody know how can I turn it 45 degrees?
You will need to do this in the image itself, using appropriate image 
editor.
Chris
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]