RTF to PDF error "Input string was not in a correct format"

Hello.
I have problem when converting to PDF some particular RTF file.

The file:
https://1drv.ms/u/s!AlJbHuTh-kkBhJFonq9sM9bUn2R9UQ?e=lVhU9l

The error log:

System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at ?? . ()
at ?? .(?? )
at ?? . ()
at ?? .()
at ?? .()
at  ? . ()
at ?? .()
at  ? .(?? )
at  ? .?()
at ?? .()
at  ? . ()
at  ? . .()
at ?? .()
at  ? .(ElementType )
at  ? . .()
at ?? .()
at  ? .(ElementType )
at  ? . .()
at ?? .()
at  ? .(Func1 , ElementType ) at  ? . .() at ?? .() at  ? .?() at  ? . .() at ?? .() at  ? .(ElementType , TableFormat , List1 , List1 , Boolean& ) at  ? . .() at ?? .() at  ? .(ElementType ) at  ? . .() at ?? .() at  ? .(Func1 , ElementType )
at  ? . ()
at ?? .()
at  ? . ()
at  ? . ?  ()
at GemBox.Document.RtfLoadOptions.7k4lmxmhj5tk8h83eglk6fss34tasuhn (Stream , String )
at GemBox.Document.DocumentModel.Load(String path, LoadOptions options)
at GemBox.Document.DocumentModel.Load(String path)

Hi,

Please try again with this NuGet package:
Install-Package GemBox.Document -Version 35.0.1641-hotfix
Does this solve your issue?

Regards,
Mario

It works. Thanks!

In the future if I want to switch to main package version (with no -hotfix) that includes this fix then I need to find

version >= 1641?

Is this how it works?

https://www.nuget.org/packages/GemBox.Document/#versions-body-tab

Yes, exactly.

As an FYI, the next public release will be made at the beginning of February.

1 Like