We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Issue saving a stamped document

We allow users to upload documents to our court via our website. Everything is working fine but I have a a user who can’t upload a PDF document. It errors when attempting to save the document after the time stamp is applied. We are using Aspose PDF version 11.5. I have attached a copy of the PDF file. Below is the Code:


Dim PDFlicense As Aspose.Pdf.License = New Aspose.Pdf.License
PDFlicense.SetLicense(“Aspose.pdf.Lic”)
textStamp = New TextStamp(“Filed with Office of Administrative Hearings”)

textStamp.Background = True
textStamp.XIndent = 200
textStamp.YIndent = 775
textStamp.TextState.FontSize = 8.0F
textStamp.TextState.FontStyle = FontStyle.CourierBold
textStamp.TextState.ForegroundColor = Aspose.Pdf.Color.FromRgb(System.Drawing.Color.Blue)

Dim pdfDocument As New Aspose.Pdf.Document(sInFile)
pdfDocument.Pages(1).AddStamp(textStamp)

pdfDocument.Save(sOutFile)
ERRORS on This Line of Code with 'Object not set to instance of an object’

Any help is greatly appreciated.

Hi Russ,


Thanks for contacting support.

I am afraid the earlier shared document appears to be broken (0KB). Can you please again try uploading the document, so that we can test the scenario in our environment. We are sorry for your inconvenience.

Maybe something happend during the upload. The file opens fine for me. I have attached it again. It should be 14,614KB in size.

I would also like to share another issue. We we having an issue where the stamp would not show. It would flash when the document was opened but then would disappear. Like it was in the background. This was only happening on some PDFs uploaded.

The code had the following line:
textStamp.Background = True
I commented this line out and now we sometimes get documents where the 1st page is readable and all the other pages are blank.
I have attached a copy of the stamped document. When open it throws an error on all pages other than page 1.
If you need the original document I will contact the filer and see if they will email it to me and upload it also.

vaughnrk:
We allow users to upload documents to our court via our website. Everything is working fine but I have a a user who can’t upload a PDF document. It errors when attempting to save the document after the time stamp is applied. We are using Aspose PDF version 11.5. I have attached a copy of the PDF file. Below is the Code:

Dim PDFlicense As Aspose.Pdf.License = New Aspose.Pdf.License
PDFlicense.SetLicense(“Aspose.pdf.Lic”)
textStamp = New TextStamp(“Filed with Office of Administrative Hearings”)

textStamp.Background = True
textStamp.XIndent = 200
textStamp.YIndent = 775
textStamp.TextState.FontSize = 8.0F
textStamp.TextState.FontStyle = FontStyle.CourierBold
textStamp.TextState.ForegroundColor = Aspose.Pdf.Color.FromRgb(System.Drawing.Color.Blue)

Dim pdfDocument As New Aspose.Pdf.Document(sInFile)
pdfDocument.Pages(1).AddStamp(textStamp)

pdfDocument.Save(sOutFile)
ERRORS on This Line of Code with 'Object not set to instance of an object’

Any help is greatly appreciated.
Hi Russ,

Thanks for sharing the resource file.

For the sake of correction, I have logged this problem
as
PDFNEWNET-40605 in our issue tracking system. We will
further look into the details of this problem and will keep you updated on the
status of correction. Please be patient and spare us little time. We are sorry
for this inconvenience.

vaughnrk:
I would also like to share another issue. We we having an issue where the stamp would not show. It would flash when the document was opened but then would disappear. Like it was in the background. This was only happening on some PDFs uploaded.
The code had the following line:
textStamp.Background = True
I commented this line out and now we sometimes get documents where the 1st page is readable and all the other pages are blank.
I have attached a copy of the stamped document. When open it throws an error on all pages other than page 1.
If you need the original document I will contact the filer and see if they will email it to me and upload it also.
Hi Russ,

Thanks for sharing the details.

I have managed to notice the above stated issue and in order to resolve such problem, we need to test and figure out the reasons behind it. Therefore, as soon as you have received the document from customer, please share it and we will keep you updated with our findings.

We are sorry for this inconvenience.

Attached is the original PDF (prior to the stamp being applied).

vaughnrk:
I would also like to share another issue. We we having an issue where the stamp would not show. It would flash when the document was opened but then would disappear. Like it was in the background. This was only happening on some PDFs uploaded.
The code had the following line:
textStamp.Background = True
I commented this line out and now we sometimes get documents where the 1st page is readable and all the other pages are blank.
I have attached a copy of the stamped document. When open it throws an error on all pages other than page 1.
If you need the original document I will contact the filer and see if they will email it to me and upload it also.
Hi Russ,

Thanks for sharing the resource file.

I have tested the scenario and have managed to reproduce same problem. For the sake of correction, I have logged it as PDFNEWNET-40628 in our issue tracking system. We will further look into the details of this problem and will keep you posted on the status of correction. Please be patient and spare us little time. We are sorry for this inconvenience.

Any word on this issue?

I had forgotten about it as we reverted to using Aspose.PDF.kit to do the stamping of documents while this was resolved and it works great.

Hi Russ,


Thanks for your patience.

I am afraid the earlier reported issue are still pending for review and are not yet resolved. However the product team will surely consider investigating/fixing them as per development schedule and as soon as we have some definite updates regarding their resolution, we will let you know. Please be patient and spare us little time. We are sorry for this delay and inconvenience.

The issues you have found earlier (filed as PDFNET-40605) have been fixed in Aspose.PDF for .NET 21.12.