Stamp not applying to all pages

Hi,

I am trying to apply a text logo stamp to all pages on in a document. According to your documentation by default the stamp is applied to all pages, however I am finding that it is only being applied to the first page:

Pages Property

Aspose.Pdf.Kit Documentation

Stamp.Pages Property

Sets or gets the page number to indicate on which pages the stamp content is added. By default,stamps each page .

I have tried not setting the Pages property at all and also setting it to an empty array (in the latter case the logo is not produced at all).

My code (based on your sample) looks like this:

public void CreateWaterMarkedPDF(string fileName, string newFileName, string text)
{
PdfFileInfo fileInfo = new PdfFileInfo(fileName);
Stamp stamp = new Stamp();

//stamp.BindImage(imageFile);
stamp.BindLogo(new FormattedText(text, Color.Red,FontStyle.TimesBold,EncodingType.Winansi,true, 48));

//specifies the Stamp object added as watermark
stamp.IsBackground = false;

//specifies the watermark rotation
stamp.Opacity = 0.5f;
stamp.Rotation = 45;

//specifies the position of stamp
stamp.SetOrigin(fileInfo.GetPageWidth(1) / 2, fileInfo.GetPageHeight(1) / 2);

//set the size of the watermark

stamp.SetImageSize(80, 80);

PdfFileStamp fileStamper = new PdfFileStamp(fileName, newFileName);

fileStamper.AddStamp(stamp);

fileStamper.Close();

}

Thanks,
Nick.

Hi Nick,

Thank you very much for considering Aspose.

We're looking into the matter. Please spare us some time so we could investigate it at our end.

We appreciate your patience.

Regards,

Hi Nick,

Thank you very much for considering Aspose.

please try using the hotfix version from the this link.

Thank you, that did the trick.

Hi,

I just wondered if you can give me any idea when this hotfix will become part of the Production build of the product? Do you have any sort of change tracking so I can see whether it is included in a particular release?

Thanks,
Nick.

Hi,

Sorry for that our issue tracking system is visited by Aspose staff only, but some useful information may be found in our product blog. And we will publish a release next month and the fix will surely be included in the next release.

Thanks,

Thanks Felix.

Hi,

Sorry to be a pain, but a month has gone by and I wondered whether this fix has been released yet. I have a software product due for release in the next month which relies on this fix and I am reluctant to distribute an unsupported version of your dll.

Thanks again,
Nick.

Hi Nick,

The next stable version of the Aspose.Pdf.Kit will be released at the end of this month, probably last week of June. This fix will be included in that release. You’ll be able to get the latest release at our product blog

I hope this helps. If you have any further questions, please do let us know.

Regards,