We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Wrong html to pdf

Hello, i have a problem with "html to pdf", no apply my css file.
This is my code:


Aspose.Pdf.HtmlLoadOptions htmloptions = new Aspose.Pdf.HtmlLoadOptions(pathCSS);
htmloptions.PageInfo.Margin.Bottom = 10;
htmloptions.PageInfo.Margin.Top = 10;
htmloptions.PageInfo.Margin.Left = 20;

Aspose.Pdf.Document doc = new Aspose.Pdf.Document(filehtml, htmloptions);
doc.Save(archivodestino);

Attachment css file , html file and pdf


Thank you

Hi there,


Thanks for your inquiry. I have tested the conversion as following and unable to notice the reported issue. Please double check you basepath for CSS file, it will resolve the problem.

Aspose.Pdf.HtmlLoadOptions
htmloptions = new Aspose.Pdf.HtmlLoadOptions(“D:/Downloads/files/”);<o:p></o:p>

htmloptions.PageInfo.Margin.Bottom = 10;

htmloptions.PageInfo.Margin.Top = 10;

htmloptions.PageInfo.Margin.Left = 20;

Aspose.Pdf.Document doc = new Aspose.Pdf.Document("D:/Downloads/files/documento.html", htmloptions);

doc.Save("D:/Downloads/documento.pdf");


Please feel free to contact us for any further assistance.

Best Regards,
Hello,

Before, I used Aspose.Pdf 2015.03.05 and working good, now with 2016.06.02 not working,

Anyone idea?

Thanks again!

Hi, thanks!!


Please, put the file css into network folder, Im testing and into local folder work fine but in network folder not working.

Thank you again!

Hi there,

Thanks for your inquiry. I have tested your scenario with shared documents via network folder and noticed the regression issue, so I have logged an issue in our issue tracking system as PDFNET-41151 and also linked your request to it. We will keep you updated via this thread regarding the issue status.

We are sorry for the inconvenience caused.

<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif”;mso-fareast-font-family:
Calibri;color:#333333;mso-ansi-language:EN-US;mso-fareast-language:EN-US;
mso-bidi-language:AR-SA”>Best Regards,

The issues you have found earlier (filed as PDFNET-41151) have been fixed in Aspose.Pdf for .NET 17.2.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.