I'm unsure if I should upgrade og change my code:
In an older asp.net 1.1 project I use:
DynamicPDF.Generator.dll 1.6.3.0
DynamicPDF.Merger.dll 1.0.3.0
DynamicPDF.SourceView.dll 1.0.3.0
A page loads a pdf and adds text at a certain position
Dim objPDFDoc As PDFDocument = New PDFDocument(selected_pdf)
Dim objDocument As MergeDocument = New MergeDocument(objPDFDoc)
objDocument.Creator = "x"
objDocument.Author = "y"
objDocument.Title = "z"
Dim objPage As ceTe.DynamicPDF.Page = objDocument.Pages(0)
Dim fntMetaUM = New TrueTypeFont(Replace(Application("path_font"), "\", "\\") & "metaum.ttf")
Dim iLeft As Integer
Dim iTop As Integer
iLeft = 450 : iTop = 775
objPage.Elements.Add(New Label(line1, iLeft, iTop, 300, 12, fntMetaUM, 9))
objPage.Elements.Add(New Label(line2, iLeft, iTop + 10, 300, 12, fntMetaUM, 9))
objPage.Elements.Add(New Label(line3, iLeft, iTop + 20, 300, 12, fntMetaUM, 8))
objPage.Elements.Add(New Label(line4, iLeft, iTop + 30, 300, 12, fntMetaUM, 8))
objPage.Elements.Add(New Label(line5, iLeft, iTop + 40, 300, 12, fntMetaUM, 8))
objPage.Elements.Add(New Label(line6, iLeft, iTop + 50, 300, 12, fntMetaUM, 8))
objPage.Elements.Add(New Label(line7, iLeft, iTop + 60, 300, 12, fntMetaUM, 8))
objDocument.Draw(Me, "File.pdf")
Response.End()
Untill now the pdf files were in pdf version 1.4 (Acrobat 5.x)
After adding new pdf files in version 1.6 (Acrobat 7.x) I now get an
error in the line "objDocument.Draw(Me, "File.pdf")".
Server Error in '/xyz' Application.
--------------------------------------------------------------------------------
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not
set to an instance of an object.
Source Error:
Line 155: objDocument.Draw(Me, "File.pdf")
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
ceTe.DynamicPDF.IO.PagePropertiesList.Add(Resource resource, PageWriter writer)
ai.a(PageWriter A_0)
w.a(PageWriter A_0)
b.a(PageWriter A_0)
ceTe.DynamicPDF.Merger.PDFPage.a(PageWriter A_0)
ceTe.DynamicPDF.Merger.ImportedPage.Draw(PageWriter writer)
ceTe.DynamicPDF.PageList.a(DocumentWriter A_0, Int32 A_1)
ceTe.DynamicPDF.IO.DocumentWriter.h()
ceTe.DynamicPDF.Document.a(Page A_0, Boolean A_1, String A_2, Boolean A_3, Assembly A_4)
ceTe.DynamicPDF.Document.Draw(Page page, String downloadAsFileName)
pagex.pdf_print.Page_Load(Object sender, EventArgs e) in
C:\Inetpub\wwwroot\xyz\pagex.aspx.vb:155
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2407; ASP.NET Version:1.1.4322.2407
NullReferenceException (Merger.dll 1.0.3.0 and pdf v. 1.6)
Re: NullReferenceException (Merger.dll 1.0.3.0 and pdf v. 1.6)
Support · Aug 27, 2007Hello,
Can you please send over the PDF document which is giving this error and the code you are using to our [^a|mailto:support@cete.com|Support Team^] so that they can take a look into it to findout what is causing this error to occur.
Thanks,
ceTe Software Support Team.
Re: NullReferenceException (Merger.dll 1.0.3.0 and pdf v. 1.6)
Forum member · Aug 29, 2007Hi,
I have the same problem too.
Any help is appreciated.
Thanks
Re: NullReferenceException (Merger.dll 1.0.3.0 and pdf v. 1.6)
Forum member · Jul 7, 2008I use this component for attaching pdf receipts to pdf reprots. When my users download their AT&T or Verizon pdf phone bills, I get this error. The pdf's look fine but they will not merge. Any ideas? In order to fix this issue we have to download the pdf then reprint the pdf file. Could there be some kind of security issue?
Re: NullReferenceException (Merger.dll 1.0.3.0 and pdf v. 1.6)
Support · Jul 7, 2008Hello,
Are you doing any sort of form filling? If yes, please make sure that you are using the exact full name of the form field?
If you are simply merging the PDF document and getting this error, please send over the PDF document to our [^a|mailto:support@cete.com|Support Team^] and they can look into it.
Thanks,
ceTe Software Support Team