v24.8
Supports applying a clipping mask to images
Document doc = new Document("input.pdf");
using (var fs1 = new FileStream("mask1.jpg", FileMode.Open))
using (var fs2 = new FileStream("mask2.png", FileMode.Open))
{
doc.Pages[1].Resources.Images[1].AddStencilMask(fs1);
doc.Pages[1].Resources.Images[2].AddStencilMask(fs2);
}
Choose paper source by PDF page size
Beginning with Aspose.PDF 24.4 this preference can be switched on and off using the Document.PickTrayByPdfSize property or the PdfContentEditor facade:
using (Document document = new Document())
{
Page page = document.Pages.Add();
page.Paragraphs.Add(new TextFragment("Hello world!"));
// Set the flag to choose a paper tray using the PDF page size
document.PickTrayByPdfSize = true;
document.Save("result.pdf");
}