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

Free Support Forum - aspose.com

PdfFileStamp AddHeader adds header but only to first four pages

PdfFileStamp fileStamp = new PdfFileStamp();
var black = new Aspose.Pdf.Facades.FontColor(0, 0, 0);
FormattedText formattedText = new FormattedText("This is my header", black, Aspose.Pdf.Facades.FontStyle.Helvetica, Aspose.Pdf.Facades.EncodingType.Winansi, false, 10);
fileStamp.AddHeader(formattedText, 5);

The result is that the PDF has the header on the first four pages, and that’s it. The rest of the PDF has no header.


Thanks for contacting support.

Can you please share source files along with generated result and desired result to further investigate this issue.

I have already included the relevant pieces of C# code above. Are you telling me that it should be adding the header to every page of the document? If so, something is wrong. The header is only added to the first four pages. Note that I am working with an unlicensed copy of ASPOSE.PDF in order to test it out to see if it will do what we need before purchasing a license.

I have received a full version via a temporary license and it appears to be working as expected. Thanks!


You are very welcome.

I notice that the ASPOSE watermark still appears though.


Please share license file along with sample file and code we will investigate this on our end to help you out.