Problem with norwegian number format

Hi, I think there is a bug with parsing decimal numbers. I use Windows XP SP2 with Norwegian setup where decimals are seperated by , not .

When I run the following code I get an error message:
(but I’m also running Aspose.pdf without this problem.)



License license = new License();

license.SetLicense(Server.MapPath(“Aspose.Pdf.Kit.lic”));

PdfFileEditor pdfEditor = new PdfFileEditor();

int start = 1;

int end = 10;

pdfEditor.Append(Server.MapPath(“NOST_Prisliste2.pdf”), Server.MapPath(“NOST_Prisliste.pdf”),start,end,Server.MapPath(“outFile.pdf”));



0.02 is not a valid number - System.FormatException: Input string was not in a correct format. at System.Number.ParseDouble(String s, NumberStyles style, NumberFormatInfo info) at System.Double.Parse(String s, NumberStyles style, IFormatProvider provider) at xeb116a323308e2f7.x9268cb62a90047a5…ctor(String xd1d55a56253db2df)

Hi, just had the same problem with french website,

in the <%@ Page directive, add Culture="en-US"

worked for me.

Michel Adey

That worked for me too. Thank you so much!

Henrik

Correct.

The default culture is en-US, the problem may emerge when it is be setted as other styles.
Adding English culture in @page directive may solve the problem.

Thanks for considering Aspose.