I’m trying to convert a html file into a pdf file but get the following exception:
The problem seems to be related with the regional setting of the system
Hi Andy,
Thanks for using our API’s.
I have tested the scenario using Aspose.Pdf for .NET 11.7.0 in Visual Studio 2010 project with .NET Framework 4.0 running over Windows 7 (x64) with Regional Settings as English (United States) and I am unable to notice any issue. Can you please share some details regarding your working environment i.e. Operating Systems detail, Regional Language settings etc, so that we can again try replicating the issue in our environment.
We are sorry for this inconvenience.
[C#]
HtmlLoadOptions htmlLoadOptions = new HtmlLoadOptions();
htmlLoadOptions.PageInfo.Margin.Bottom = 10;
htmlLoadOptions.PageInfo.Margin.Top = 20;
//see html file in solution
Document doc = new Document(@"C:\0a682f2a-3449-4c51-a493-3ef38d251d6c.html", new HtmlLoadOptions());
doc.Save(@“C:\0a682f2a-3449-4c51-a493-3ef38d251d6c.pdf”);
Hi Andy,
That’s strange, we’ve tested the same scenario on some different pc’s (same setup windows 10 and 7, 64 bit) and after the regional setting additional change, they all encounterd the same problem. Just switch decimal symbol from ‘dot’ to ‘comma’ and digit grouping symbol from comma to ‘dot’.
The issues you have found earlier (filed as PDFNET-41047) have been fixed in Aspose.PDF for .NET 23.2.