Hi there,
We are using AsposePDF.dll 18.10 (c# .net 4.7.2) to crop the pdfs to html. It works generally fine but for some pdfs cropping cannot work correctly at the first page. (Values of cropbox are ignored.) There is no problem for other pages. You can find the sample pdf below.
7501_1.pdf (5.6 MB)
var original_book = new Aspose.Pdf.Document(@"C:\7501_1.pdf");
original_book.Pages[1].CropBox = new Aspose.Pdf.Rectangle(29, 294, 283, 437);
Document cropped_area = new Document();
cropped_area.Pages.Add(original_book.Pages[1]);
string output_file_route = Path.Combine(@"C:\Deneme", "Output.html");
HtmlSaveOptions opt = new HtmlSaveOptions
{
CompressSvgGraphicsIfAny = false,
AntialiasingProcessing = HtmlSaveOptions.AntialiasingProcessingType.TryCorrectResultHtml,
UseZOrder = true
};
cropped_area.Save(output_file_route, opt);
Thanks for any support.