[cups.development] How to support Watermark in CUPS driver

Michael Sweet msweet at apple.com
Thu May 19 20:00:20 PDT 2011


On May 19, 2011, at 6:09 PM, keens312 wrote:
> ...
> To implement such a PDF pre-filter, do we have to interpret and render the PDF content, then blend the watermark?
> 
> If not, how to blend the PDF with the watermark with CoreText or CoreGraphics?

You'll have two CGPDFContextRef's - one for the input file and one for output to stdout. For each page in the input file, draw the page to the output context and then do your watermark drawing on top of that.

If you don't have a filename on the command-line you'll need to copy stdin to a temp file and then point CG at that.

________________________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cups.org/pipermail/cups/attachments/20110519/8332f4a8/attachment.html>


More information about the cups mailing list