Hi!
Gerben Vos wrote:
PdfSharp ignores digits after the 10th decimal. Whether that is a smart move or not is debateable.
Not really IMHO. According to Adobe Reference material, Adobe Reader uses single precision inside (up to 7 decimal digits of precision).
From .NET documentation: "A Single value has up to 7 decimal digits of precision, although a maximum of 9 digits is maintained internally".
Not much gained by reading more than 10 digits.
Gerben Vos wrote:
Why isn't float.Parse() used, possibly after checking that the token only contains digits and a period?
I don't know. But this is a good question. I'll try to find out.
PDFsharp was developed with .NET 1.1 and float.TryParse() was still missing. float.Parse() would have been an option back then - and float.TryParse() is an option today.