On Thu, 2019-11-28 at 13:30 +0000, Jacob Pedersen wrote:
> I have two PDF’s of same number of pages. I need to overlay the pages
> from the one PDF on the other.

        Hi,
I do not have any real answer. Try the code from the podofomerge tool,
that way you can merge the PDFs, then convert those overlay pages in
PdfXObject-s (and delete them from the new PDF), then draw those using
PdfPainter on top of existing pages. If I recall correctly, the painter
adds content to the pages, unless told otherwise. Just do that with a
memory document, which can be updated on the fly. You can do your
changes as incremental update, but maybe it's not what you want.

There is a simple example for litePDF how to draw resources to existing
pages here [1]. There are other examples as well. The litePDF is just a
wrapper on top of PoDoFo functions (with some added values you are not
interested in), thus with "a bit" of study you can see how things are
done with PoDoFo and extract only that part for your usage.

Maybe others have better ideas, though I'm afraid your use case is kind
of specific and even there can be tests / examples /tools for similar
things, you might do your homework and study on your own. I'm sorry.

By the way, PDF supports watermarks, which are for these things (if I
understood correctly what you want to achieve).
        Bye,
        zyx

[1] https://litepdf.sourceforge.io/drawtoresource.cpp.html



_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to