i have wpf application in which user enters some text in rich text box(rtb) i 
convert that rtb string to html and then convert that html to image and then 
insert it in the pdf document  


using (Stream inputPdfStream = new FileStream("sample.pdf", FileMode.Open, 
FileAccess.Read, FileShare.Read))
            using (Stream outputPdfStream = new FileStream("result2.pdf", 
FileMode.Create, FileAccess.Write, FileShare.None))
            {
                var reader = new
 PdfReader(inputPdfStream);
                var stamper = new PdfStamper(reader, outputPdfStream);

                PdfContentByte pdfContentByte = null;

                int c = reader.NumberOfPages;

                iTextSharp.text.Image image = 
iTextSharp.text.Image.GetInstance(ConvertXamltohtmltoImage(xamlstring));

                              

                foreach (var item in
 lst)
                {
                    image.ScaleToFit(item._Size.Width, item._Size.Height);
                    image.SetAbsolutePosition(item.Location.X, item.Location.Y);
                    pdfContentByte = stamper.GetOverContent(item.pageNo);
                    pdfContentByte.AddImage(image);
                }
               
 stamper.Close();
            }


my question is can i insert html directly into pdf? 
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
iText-questions mailing list
[email protected]
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