In Aspose.PDF .NET 20.9.0. Setting CropBox on a page does not crop the page though GetPageRect says it was.
This worked in version 19.4.0
c# nUnit test to repeat:
[Test]
public void CropBoxTest()
{
string methodName = MethodBase.GetCurrentMethod().Name;
string path = DocConfig.GetAssetOutputPath(methodName + ".pdf");
var doc = new Document();
Page page = doc.Pages.Add();
page.PageInfo.Width = 678;
page.PageInfo.Height = 858;
page.PageInfo.Margin = new MarginInfo(0, 0, 0, 0);
page.ArtBox = new Aspose.Pdf.Rectangle(llx: 0, lly: 0, urx: 678, ury: 858); //678x858
page.CropBox = new Aspose.Pdf.Rectangle(llx: 0, lly: 0, urx: 678, ury: 858); //678x858
page.MediaBox = new Aspose.Pdf.Rectangle(llx: 0, lly: 0, urx: 678, ury: 858); //678x858
page.Rect = new Aspose.Pdf.Rectangle(llx: 0, lly: 0, urx: 678, ury: 858); //678x858
page.TrimBox = new Aspose.Pdf.Rectangle(llx: 33, lly: 33, urx: 645, ury: 825); //612x792
page.BleedBox = new Aspose.Pdf.Rectangle(llx: 24, lly: 24, urx: 654, ury: 834); //630x810
page.Paragraphs.Add(new TextFragment($"{methodName} created on {DateTime.Now}"));
page.Paragraphs.Add(new TextFragment($"{path}"));
var before = page.GetPageRect(true);
page.Paragraphs.Add(new TextFragment($"Size before: {before.Width} x {before.Height}"));
//CROP THE PAGE
page.ArtBox = page.BleedBox = page.CropBox = page.MediaBox = page.Rect = (Aspose.Pdf.Rectangle)page.TrimBox.Clone();
var after = page.GetPageRect(true);
page.Paragraphs.Add(new TextFragment($"Size after: {after.Width} x {after.Height}"));
doc.Save(path, SaveFormat.Pdf);
doc.Dispose();
Assert.AreNotEqual(before.Width, after.Width);
FileAssert.Exists(path);
}