Hi there,
We are using AsposePDF.dll 21.9 (c# .net 4.7.2) to crop the pdfs to html. Cropping generates a green blank output (instead of the page content) for some pdfs. You can test the issue 53. page of sample pdf by changing cropbox rectangle values.
We couldn’t find any reason. Many thanks for any support.
Sample pdf url : https://we.tl/t-8h5Ehjn8Ed
var original_book = new Aspose.Pdf.Document(@"C:\99007_1.pdf");
original_book.Pages[53].CropBox = new Aspose.Pdf.Rectangle(29, 294, 283, 437);
Document cropped_area = new Document();
cropped_area.Pages.Add(original_book.Pages[53]);
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);