Hi Antonio,
Thanks for contacting support.
In order to test our API without any limitations, please request a 30 days temporary license. For further details, please visit Get a temporary license
Hello Nayyer,
Hello again.
Hi Antonio,
Sure.
Hi Antonio,
Hello Nayyer,
Hi Antonio,
As we
recently have been able to notice this issue, so development team requires
little time to investigate and figure out the reasons of this problem.
Nevertheless, as soon as we have made some definite progress towards
its resolution, we would be more than happy to update you with the status of
correction.<o:p></o:p>
My humble request is to please be patient and spare us little time.
No problem.
Hello Nayyer,
Hi Antonio,
The development team has been busy resolving other priority issues and I am afraid the issue reported earlier is not yet resolved. Nevertheless, as soon as we have some definite updates regarding its resolution, we would be more than happy to update you with the status of correction. Please be patient and spare us little more time.
We are really sorry for
this inconvenience.
Hi Antonio,
Stream input = File.OpenRead(@“C:\pdftest\37240_Test1.pdf”);<o:p></o:p>
// select desirable page size
float newPageWidth = 400f;
float newPageHeight = 400f;
// tune PdfPageEditor class
Aspose.Pdf.Facades.PdfPageEditor pdfEditor = new Aspose.Pdf.Facades.PdfPageEditor();
pdfEditor.BindPdf(input);
pdfEditor.PageSize = new Aspose.Pdf.PageSize(newPageWidth, newPageHeight);
pdfEditor.VerticalAlignmentType = Aspose.Pdf.VerticalAlignment.Center;
pdfEditor.HorizontalAlignment = Aspose.Pdf.HorizontalAlignment.Center;
// this scales page content to fit width,
// comment it out or set Zoom to 1.0F if You don't want to scale
// content and only want to change page's size(i.e. crop it)
float zoom = Math.Min((float)newPageWidth / (float)pdfEditor.Document.Pages[1].Rect.Width,
(float)newPageHeight / (float)pdfEditor.Document.Pages[1].Rect.Height);
pdfEditor.Zoom = zoom;// (float)595;
MemoryStream output = new MemoryStream();
pdfEditor.Save(output);
File.WriteAllBytes(@"C:\pdftest\37240_Test1_out.pdf", output.ToArray());
// then reload scaled document and save it to HTML
Document exportDoc = new Document(@"C:\pdftest\37240_Test1_out.pdf");
HtmlSaveOptions htmlOptions = new HtmlSaveOptions();
// this code shows page boreder in result - sometimes it comes in handy to see borders
SaveOptions.BorderPartStyle borderStyle = new SaveOptions.BorderPartStyle();
borderStyle.LineType = SaveOptions.HtmlBorderLineType.Dotted;
borderStyle.Color = System.Drawing.Color.Gray;
htmlOptions.PageBorderIfAny = new SaveOptions.BorderInfo(borderStyle);
// conversion to HTML itself
exportDoc.Save(@"C:\pdftest\37240_Test1.html", htmlOptions);
The issues you have found earlier (filed as PDFNEWNET-37240) have been fixed in Aspose.Pdf for .NET 9.7.0.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.