I am adding header with Page Number and watermark image in PDF and I am getting below error.
There are different types pages(A0, A1, A2, A3, A4) in the same PDF
93 Pages in this PDF (One PDF may contain 700 pages in future).
Add watermark image in PDF is working if i will use separately but Add header is not working separately and as well as with watermark image.
I think this error is in Add Header for mixed page size of PDF .
System.OutOfMemoryException
HResult=0x8007000E
Message=Exception of type ‘System.OutOfMemoryException’ was thrown.
Source=Aspose.PDF OutOfMemoryException.PNG (89.2 KB)
Would you please also share the sample source PDF file for our reference along with the sample code snippet in text format? We will test the scenario in our environment and address it accordingly.
Thanks for your response.
PFB pdf and code both and I edited pdf because as you know we can upload up to 5 MB. In real scenario PDF size will be up to 700+ MB, Page up to 900+ and one pdf file contain different types of page size (A0, A1,…A4)
We used your code snippet to process the PDF file that you have shared. We did not notice any OutOfMemoryException. However, the generated PDF document did not seem correct. Could you please check it and share an expected output PDF document that you want to generate?
We tested the scenario using the file which you have recently shared. We noticed that the memory consumption was too high that program became unresponsive and we had to terminate it forcefully. Therefore, we have logged an investigation ticket as PDFNET-49626 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.
Have you tried 21.3v with this file at your end? Do you notice OOM with this file as well?