MyDocument.Draw Error

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF Generator for .NET (v3 and older)  /  MyDocument.Draw Error

DynamicPDF Generator for .NET (v3 and older) Forum

 Sep 10 2009 9:30 AM
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)
 Sep 10 2009 10:11 AM
Posted by a ceTe Software moderator
Hello,

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.
 Sep 10 2009 10:20 AM
Thank 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?
 Sep 10 2009 12:00 PM
Posted by a ceTe Software moderator
Hello,

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.
 May 15 2017 4:08 PM
I 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?
 May 16 2017 9:42 AM
Posted by a ceTe Software moderator
Hello,

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 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.

All times are US Eastern Standard time. The time now is 3:12 AM.