Hi,
I've been trying to add some content to PDFs using iTextSharp and I'm
having a problem.
I'm using PdfStamper to copy a page from a source and then add an image and
some text to it. The problem is the copied content isn't being copied
right: the original text formatting changes and seems to get the wrong
encoding. Can you help me with this?
I'm using this code to do it:
PdfReader reader = new PdfReader(oldFile);
PdfStamper stamper = new PdfStamper(reader, new
FileStream(newFile, FileMode.Create, FileAccess.Write));
PdfContentByte canvas = stamper.GetUnderContent(1);
Image image = Image.GetInstance(signatureFile);
image.SetAbsolutePosition(50, 100);
image.ScaleToFit(225f, 50f);
canvas.AddImage(image);
stamper.Close();
Thank you.
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
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