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

Free Support Forum - aspose.com

API is generating invalid PDF after adding PdfPageStamp

Hi There,

I am getting an issue very similar to the below with version 21.7 but no error appears when opening in Adobe Reader.

I downloaded version 22.4 to check if the latest version addresses it. It does not.

The attached document is 287 pages in length (edit: 50mb limit prevents this, so just attached a few pages in individual files). When creating a stamp from each page in it and stamping it into a page in another PDF, the following pages fail and zero content comes through.
21-22, 31-41, 62-249, 264-268.

In our licensed version 21.7, I proceeded to generate a new PDF from the source PDF by inserting the required number of blank pages and then stamping each source page into the new PDF. I reviewed each page to see which did not work, i.e. which came out blank. This gave me the list above.

I then proceeded to see which of these pages would work in the latest version. I first split the original document into single page PDFs, but just for the failed page numbers listed. I did this to avoid bumping into the evaluation version’s limitations (i.e. addressing anything above the 4th page).

With version 22.4, I took each of these single page PDFs (definitely had content) and generated a new PDF from them. Inserting one page and stamping the content from each source file to each new file. All the pages ended up blank.

Additionally - I was not able to raise a paid support ticket, even though I have paid for priority support valid until 21 May 2022. Our ability to get software updates expired in 5 Jan 2022. I was told at the time of purchasing priority support that this would have no affect on our priority support period but appears to have because I am prevented from raising the paid ticket.

Tim Farrelly
Page21.pdf (8.6 KB)
Page31.pdf (43.8 KB)
Page41.pdf (54.0 KB)
Page62.pdf (175.3 KB)
Page72.pdf (70.1 KB)
Page92.pdf (49.7 KB)
Page112.pdf (97.3 KB)
Page132.pdf (479.4 KB)
Page152.pdf (82.2 KB)
Page172.pdf (112.1 KB)
Page247.pdf (106.6 KB)
Page267.pdf (8.3 KB)


Are you using the same code snippet that was mentioned in the other post that you have referenced? Can you please share the complete PDF document as well for our testing purposes?

Meanwhile, please create a topic in Purchase forum related to your above concerns and they will be addressed accordingly. You can then continue either with this post or create new topic in paid support forum.

Hi asad.ali,

Here’s a link to the full file.

The code is similar. For example, for each single page PDF file

    Dim loFromDoc As New Aspose.Pdf.Document("Page21.pdf")
    Dim loOutDoc As New Aspose.Pdf.Document()
    Dim loPageStamp As PdfPageStamp = New PdfPageStamp(loFromDoc.Pages(1))
    loPageStamp.Background = True
    loPageStamp.HorizontalAlignment = HorizontalAlignment.None
    loPageStamp.VerticalAlignment = VerticalAlignment.None

Tim Farrelly


We have logged another ticket as PDFNET-51734 in our issue management system to address this case. We will let you know as soon as we have some updates about ticket resolution. Please be patient and spare us some time.

We apologize for the inconvenience.

PS: We were unable to access the link to full document. Can you please upload it to public file sharer and share the link again?

Take 3. https://drive.google.com/file/d/1_7mUh_KpOKi2jaV6YLWRzKGwX4J2GF0-/view?usp=sharing


Thanks for providing the sample file. We have updated the ticket accordingly.