Stamping document comes up blank and Acrobat says error on page

Hi There,

I have attached a single page pdf that I have used to create a stamp from the first page. Then I created a new document, added a page and applied the stamp to it. The source document shows content. The new document shows no content and when opened in Adobe Acrobat Reader gives an “error exists on this page” message.
image.png (5.4 KB)

The code is as follows
Dim loToDoc As New Aspose.Pdf.Document()
loToDoc.Pages.Add()
Dim loFromDoc As New Aspose.Pdf.Document(“C:\Root Files\CC Attach\SinglePage.PDF”)
Dim loPageStamp As PdfPageStamp = New PdfPageStamp(loFromDoc.Pages(1))
loToDoc.Pages(1).AddStamp(loPageStamp)
loToDoc.Save(“C:\Root Files\CC Attach\NewStamped.PDF”)
loToDoc.Dispose()
loFromDoc.Dispose()

Any thoughts on why this failed please?

I should add that in the real application, the document I am stamping has other content on it. Using stamping is my method of preserving the original content and bringing in the other content. So simply replacing the destination page with the source page is not an option.

Thanks
Tim

SinglePage.PDF (47.5 KB)
NewStamped.PDF (47.5 KB)
image.png (5.40 KB)

@twf

We were able to notice the issue in our environment while testing the scenario with 21.4v of the API. Hence, we have logged it as PDFNET-49830 in our issue tracking system. We will further look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.

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