Using an AcroField as a placeholder

View: New views
1 Messages — Rating Filter:   Alert me  

Using an AcroField as a placeholder

by Jürgen Wehrmaker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi list

Using ItextSharp, produce pdf of report to fill by means of PdfStamper
and AcroFields around text fields. PDF Template has a backroundimage.
Some fields are substitute symbols for pictures, which I replace by
program, with the following code:

see http://itext.ugent.be/library/question.php?id=31
...
 >PdfContentByte cb =  pdfStamper.GetOverContent(page);
 >cb.AddImage(img);

My problem is that the images are not shown in result PDF (File1.PDF)!

If I copy the result PDF programmatically to another PDF by:

PdfReader reader = new PdfReader("File1.pdf");
Document document = new Document(e);
PdfWriter writer = PdfWriter.GetInstance(document, new
FileStream("File2.pdf"), FileMode.Create));
PdfContentByte cb = writer.DirectContent;

int i = 0;
while (i < n)
{
  document.NewPage();
  PdfImportedPage page = writer.GetImportedPage(reader, ++i);
  cb.AddTemplate(page, 0, 0);
}

Show Images at right place but nothing at Textfields from AcroFields!


What is wrong?
Any hints?

Thanks
Jürgen





-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
itextsharp-questions mailing list
itextsharp-questions@...
https://lists.sourceforge.net/lists/listinfo/itextsharp-questions
LightInTheBox - Buy quality products at wholesale price