<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On May 19, 2011, at 6:09 PM, keens312 wrote:</div><blockquote type="cite"><div><font class="Apple-style-span" color="#000000">...<br></font>To implement such a PDF pre-filter, do we have to interpret and render the PDF content, then blend the watermark?<br><br>If not, how to blend the PDF with the watermark with CoreText or CoreGraphics?<br></div></blockquote><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div>________________________________________________________________________<br>Michael Sweet, Senior Printing System Engineer, PWG Chair<br></div></span>
</div>
<br></body></html>