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

Free Support Forum - aspose.com

Control image quality when adding imagestamps

Hi,

I add tiff images via imagestamps to an existing pdf document.
How can I control the image quality of these stamps in the resulting document?

Greetings,

Markus

Hi Markus,


Thanks for contacting support.

I am afraid the requested feature is
currently not supported but for the sake of implementation, I have logged this
requirement in our issue tracking system under New Features list as PDFNEWNET-34960.
We will further investigate this requirement in details and will keep you
updated on the status of a correction. <o:p></o:p>

We apologize for your inconvenience.

Hi Markus,


Thanks for your patience. Your reported issue has been resolved in Aspose.Pdf for .NET 9.1.0, a quality property is added for Image stamp. This is quality of image in percents (valid values are [0…100]).Please check sample code snippet as following. Hopefully it will help you to accomplish the task.

DOM<o:p></o:p>

Document doc = new Document("PdfWithText.pdf");

ImageStamp stamp = new ImageStamp("butterfly.jpg");

stamp.Quality = 10;

doc.Pages[1].AddStamp(stamp);

doc.Save("out.pdf");

Facades

PdfFileStamp pfs = new PdfFileStamp();

pfs.BindPdf("PdfWithText.pdf");

Aspose.Pdf.Facades.Stamp stamp1 = new Aspose.Pdf.Facades.Stamp();

stamp1.BindImage("butterfly.jpg");

stamp1.Quality = 10;

pfs.AddStamp(stamp1);

pfs.Save("34959-1.pdf");

Please feel free to contact us for any further assistance.


Best Regards,