I'm throwing an "Object reference not set to an instance of an object" error on the line of code in a PDF generator page of mine that simply says:
MyDocument.Draw(txtTemplateLocation)
Can't figure out what it's talking about...has anyone else seen this?
Here is more of the actual error text:
Object reference not set to an instance of an object.
at zz93dp.DrawDictionary(DocumentWriter writer)
at ceTe.DynamicPDF.Forms.FormField.Draw(DocumentWriter writer)
at ceTe.DynamicPDF.IO.DocumentResourceList.a(DocumentWriter A_0)
at zz93be.v()
at ceTe.DynamicPDF.Document.Draw(String filePath)
at associationReady.USbankHomeMortgage.GetQuestions() in D:\Webs\AR\ReadyResale\readyresale\readyresaleadmin\pdfTemplates\USBankHomeMortgage.aspx.vb:line 653
at associationReady.USbankHomeMortgage.Page_Load(Object sender, EventArgs e) in D:\Webs\AR\ReadyResale\readyresale\readyresaleadmin\pdfTemplates\USBankHomeMortgage.aspx.vb:line 66
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
MyDocument.Draw Error
Re: MyDocument.Draw Error
Support · Sep 10, 2009Hello,
The error you are getting most likely because of some null object added to the PDF document object. Please make sure that you are not adding any page element without creating an object or with some null data in it. Also make sure that you are using the correct form field names if you are filling form fields.
Thanks,
ceTe Software Support Team.
Re: MyDocument.Draw Error
Forum member · Sep 10, 2009Thank you for your quick reply. The form fields in my document all check out, it is making it through all of them without throwing any errors at all. I haver personally rebuilt the base PDF document from a raw scan and know that no additional objects were added to it besides the form fields that i need it to fill out. Can you think of anything else it might be?
Re: MyDocument.Draw Error
Support · Sep 10, 2009Hello,
Please make sure that you are using the correct form field name to fill the fields. Also double check the values for NULL before filling the fields if you are getting the data from a database. If you are still having a problem then please send over the source PDF and a sample code you are using so that we can look into it further.
Thanks,
ceTe Software Support Team.
Re: MyDocument.Draw Error
Forum member · May 15, 2017I am having this same issue - this forum was helpful.
Is there a way to double check from Fiddler each value that the PDF is filling?
Re: MyDocument.Draw Error
Support · May 16, 2017Hello,
PDF forms are different from HTML forms and you won’t be able to see anything in fiddler. Please send over the following information to [^a|mailto:support@cete.com|opennewwindow|support@cete.com^] so we can look into the issue further:
1. A copy of the PDF form you are trying fill.
2. Version and build number of the DynamicPDF dll. (The details tab of dll properties window will have this info)
3. Code used to fill the PDF form.
4. Full exception message including the stack trace.
Thanks,
ceTe Software Support Team.