Hello Olivier, hello all,
On 22 February 2018 at 17:54 Olivier Mascia <o...@integral.be> wrote:
> Dear all,
> How about watermarking pages?
> Either with text, images or PDF pages?
I'm no expert for "watermarking", especially about securing/hardening
against removal of such a watermark (e.g. e-books marked with customer data).

> I mean, take two existing PDF files A and B.
> Update file A, placing content of page B.2 so it displays underneath
> (or over) page A.1 existing content?
> Or given PDF file A, add text or images underneath (or over) page A.2?
Ah, that is meant: If there's any problem doing that with PoDoFo, it's the
latter's bug ;-). Just append the page's stream to the watermark's (what
comes later draws over the preceding content). In case graphics settings
could be changed in a page without reset: call PdfPainter::Save() first
(on an empty page, which has to be set first), then PdfPainter::GetCanvas(),
append the background's content's stream PdfPage::GetContents()->GetStream()
to the former's return object, call PdfPainter::Restore(), then append the
foreground likewise, call PdfPainter::FinishPage() (is automatically called
by SetPage()) and you should be set (sorry, I haven't tested this yet with
a current revision of PoDoFo, so please report any oddities you see).

> Is there any known piece of code (even pseudo code of course or just some
> explanations) which would give pointers on how to achieve this using PoDoFo
> or building it around PoDoFo?

Please see above for an explanation/recipe. I hope this helps you.
> Thanks,
> -- 
> Best Regards, Meilleures salutations, Met vriendelijke groeten,
> Olivier Mascia
Best regards, mabri

Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Podofo-users mailing list

Reply via email to