I'm evaluating DynamicPdf to see if we can use it in our software. For this I need a template using Formfields to fill in by our software.
I've created a pdf template with form fields using OpenOffice.org Writer.
The filling of the formfields is successfull but when I call the Draw() method on the merger I receive an Argument Exception. Executing the same code with a document created in Adobe Acrobat is succesfull.
The ErrorMessage:
"Item has already been added. Key in dictionary: 'F1' Key being added: 'F1'"
Stacktrace:
at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
at System.Collections.Hashtable.Add(Object key, Object value)
at ceTe.DynamicPDF.Merger.Forms.PdfForm.a(String A_0, Font A_1)
at ceTe.DynamicPDF.Merger.Forms.PdfTextField.a(gt A_0)
at ceTe.DynamicPDF.Merger.Forms.PdfTextField.a(gt A_0)
at ceTe.DynamicPDF.Merger.Forms.PdfTextField.a(gt A_0)
at ceTe.DynamicPDF.Merger.Forms.PdfTextField.get_Font()
at zz93.c5.h()
at zz93.c5.c(DocumentWriter A_0)
at ceTe.DynamicPDF.Forms.FormField.Draw(DocumentWriter writer)
at ceTe.DynamicPDF.IO.DocumentResourceList.b(DocumentWriter A_0)
at zz93.od.u()
at ceTe.DynamicPDF.Document.Draw(Stream stream)
at MyDemo.Pdf.TemplateBasedPdfGenerator.Flush() in C:\Users\raymond\Documents\Connectis\Src\MyDemo.Pdf\MyDemo.Pdf\TemplateBasedPdfGenerator.cs:line 55
at MyDemo.Pdf.Test.TemplateBasedPdfGeneratorTest.Flush() in C:\Users\raymond\Documents\Connectis\Src\MyDemo.Pdf\MyDemo.Pdf.Test\TemplateBasedPdfGeneratorTest.cs:line 140
at MyDemo.Pdf.Test.TemplateBasedPdfGeneratorTest.Flush_PdfGenerated_PdfDoesMatch() in C:\Users\raymond\Documents\Connectis\Src\MyDemo.Pdf\MyDemo.Pdf.Test\TemplateBasedPdfGeneratorTest.cs:line 147
I can't figure out where the F1 is coming from.
ArgumentException on calling Draw()
Re: ArgumentException on calling Draw()
Support · Nov 18, 2010Hello,
Can you please send over the code and the input PDF document with which you are getting error while merging and filling to [^a|mailto:support@cete.com|opennewiwndow|support@cete.com^] so we can look into it further?
Thanks,
ceTe Software Support Team.