Eduardo,

Eduardo Pindado wrote
> I created a small java application that given a pdf, adding an image
> (either a picture or barcode). It worked fine until I used as a pdf model
> one contract scanned. If I add text to the pdf it appears correctly but no
> images. It is possible that as the contract is scanned and therefore is an
> image, the new ones (which i added) appears in the background or
> something?I put the code responsible for loading the image:
> 
>             [...]
>             PdfContentByte underContent =
> stamper.getUnderContent(maxPagina);
>             underContent.addImage(img);
>             [...]
>             underContent.addImage(imageCode);

You add images to the UNDERcontent, i.e. to a stream whose contents are
displayed under the existing content. You might want to use the OVERcontent:

            PdfContentByte overContent = stamper.getOverContent(maxPagina);
            overContent.addImage(img);
            [...]
            overContent.addImage(imageCode);

Regards, Michael



--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/Image-not-appearing-tp4657787p4657788.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to