Creating a PDF, I have a function that Adds a Footer below, at the bolded line, I am getting the error:
System.IO.IOException: Read pdf error:Trailer object is null.: v4.6.0.0
Any ideas what can be causing this? Very time sensitive issue as this is on our production server. Thank you.
Public Sub AddFooter(ByVal strFileIn As FileStream)
Dim strFileOut As FileStream = strFileIn ' Output file can't be nothing, so I assign it a value to be overwritten.
Dim txt As New FormattedText()
'TODO: If possible, replace text with image to get the superscript "SM" in place.
' Footer FormattedText Object
Dim ft As New FormattedText("AgendaManager – Powered by the CAIU", _
System.Drawing.Color.FromArgb(255, 207, 207, 207), _
Kit.FontStyle.HelveticaBold, _
EncodingType.Winansi, _
True, _
10)
' PdfFileStamp type object
Dim filestamp As New PdfFileStamp(strFileIn, strFileOut)
filestamp.AddFooter(ft, 44, 0, 72)
filestamp.Close()
strFileIn.Close()
strFileOut.Close()
End Sub