1

Using XSL-FO, is it possible to add a watermark to a document that is visible only when it is printed?

MY XSL-FO output format is PDF.

I suspect that the answer is no, but I would love to hear different.

Kevin Brown
  • 8,805
  • 2
  • 20
  • 38
Tiksi
  • 471
  • 1
  • 6
  • 15
  • It is not a question for XSL FO. Your question is whether any PDF can be can be created that way. Do you have an example PDF created with any technology that does this? – Kevin Brown Dec 03 '15 at 01:06
  • I don't personally have an example PDF that supports this, but as per this comment on another question http://stackoverflow.com/a/10044409/1423896 it should be possible by "wrapping the watermark in a PDF layer (Optional Content Group), then configuring the Usage attribute of this layer as Print-Only." Problem is, I don't know how to create a layer and set Usage from within XSL-FO. The system I am using only allows me to specify XSL-FO, and not other options in the PDF generation process. – Tiksi Dec 03 '15 at 07:25
  • IMHO, it would only function for PDF viewers/print mechanisms that support layers. Unless you are also forcing all end users to only use Adobe Reader, then the solution likely will not work. – Kevin Brown Dec 03 '15 at 18:51

2 Answers2

1

AH Formatter from Antenna House can produce PDF with print-only layers as you describe. See http://www.antennahouse.com/product/ahf60/docs/ahf-ext.html#pdf-layer

You could put the print-only watermark in one of the side regions and use axf:layer to make it appear on a layer that you have set up to be print-only.

Tony Graham
  • 7,306
  • 13
  • 20
1

There is a free renderer named altsoft xml2pdf that supports layers, see https://www.alt-soft.com/tutorial/xslfo_tutorial/xsl-fo_extensions_pdf-layer.html I use this renderer for regular production since years, but its windows only.

Andreas
  • 1,220
  • 8
  • 21