Hi,
We’re getting “Invalid type of object” on saving to html when we’ve resized the pdf.
Aspose.Pdf version 17.6, .Net, Windows 7
C#
var pdfEditor = new PdfPageEditor();
pdfEditor.BindPdf(fileStream);
var page = pdfEditor.Document.Pages[1];
var ImageWidth = 640;
var coefficient = ImageWidth / (float)page.GetPageRect(true).Width;
var newHeight = (float)page.GetPageRect(true).Height * coefficient;
pdfEditor.PageSize = new PageSize(ImageWidth, newHeight);
pdfEditor.VerticalAlignmentType = VerticalAlignment.Center;
pdfEditor.HorizontalAlignment = HorizontalAlignment.Center;
pdfEditor.Zoom = coefficient;var stream = new MemoryStream();
pdfEditor.Save(stream);
new Document(stream).Save(“skanner.html”, new Aspose.Pdf.HtmlSaveOptions());
skanner.pdf (876.7 KB)