Hello Etienne, hello Denis, hello all,
> Etienne Robin <etienne.ro...@iriscorporate.com> has written on 28 September 
> 2017 at 12:21:
> 
>  Hello,
... snip ...
> To really paint the image below the page content, the only solution I see is
> to edit the page content stream and insert the image painting (Do operator)
> at the beginning (something rather tricky to do …)

wouldn't it work to first do GetFilteredCopy() on the page's content stream
(GetObject() on the page, then GetStream() on the returned object) into
a buffer1, Set() the stream to empty, paint the image on the page, then
GetFilteredCopy() content stream of that into (another) buffer2?
Finally on the content stream mentioned first: BeginAppend(); Append(buffer2,
buffer2_length); Append(buffer1, buffer1_length); EndAppend();

Maybe it will also work to append buffer1 without first making a buffer2,
however, the 3-param version of BeginAppend() then has to be used with the
last two parameters set to false (see the docs for the first param, please).

Then the image will be drawn first, and then the other page content on top
of it. I haven't tested the suggestions (I currently don't have PoDoFo
installed), though still hope this helps.

> 
> Etienne
> 

Best regards, mabri

> > On 27 Sep 2017, at 09:40, MINNE Denis <denis.mi...@vivaqua.be> wrote:
> > 
> > Hello.
> > 
> > First, i want to thank you for this program.
> > I’m trying to use the source code to create a program to add an image on an 
> > existing PDF.
> > I have used your programs, but the image is placed on the front of the 
> > document and the information’s on the page are hidden by the image.
> > Is it possible to force the image to be placed behind all other data’s
> > 
> > PdfMemDocument doc2( "0100100.PDF" );
> > PdfImage image(&doc);
> > 
> > image.LoadFromFile("DUPLICATA5.tif");
> > 
> > PdfPage* pPage = doc.GetPage(0);
> > painter.SetPage(pPage);
> > painter.DrawImage( 0, 0, &image, 1, 1 );
> > painter.FinishPage();
> > 
> > doc.Write("test3.pdf");
> > 
> > Thank you!  
> > 
> > Denis Minne
> >

------------------------------------------------------------------------------
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
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to