On 20/11/2012 11:37, Yogalakshmi J wrote: > I am trying to get a particular page from the PDF and create a new PDF > out of the extracted page. The source code that I have written is below: > iTextSharp.text.Document d1 = new iTextSharp.text.Document(); > PdfSmartCopy scopy = new PdfSmartCopy(d1, new > FileStream(nFile, FileMode.Create)); > d1.Open(); > scopy.AddPage(scopy.GetImportedPage(objReader, 20)); > d1.Close(); > Console.WriteLine("New PDF created"); > But I get the following general .Net exception in the highlighted line. > "An Item with the same key has already been added." > But, the same code in Java is working fine. I am able to extract a page > and create a new PDF with that page. > Any help is greatly appreciated.
We think we know the problem. We've had a similar question on the paid support list. We're working on a solution for a customer. We'll add your description to that ticket, but as you don't provide a sample PDF that reproduces the problem, we won't look into it any further. ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ 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