Welcome Guest Search | Active Topics | Sign In | Register

Defect - PdfDocument.Merge() when thread culture is Arabic Options
Talogy Development
Posted: Wednesday, July 23, 2025 12:27:09 PM
Rank: Newbie
Groups: Member

Joined: 5/24/2019
Posts: 6
It looks like a defect was introduced in the 25.2.* versions of the EO.pdf nuget package when the current thread culture is set to certain Arabic culture codes and PdfDocument.Merge() is called. Steps to reproduce:

1. Create a .NET full framework (4.8) console application
2. Add any of the 25.2.* EO.pdf nuget packages to the project
3. Add this code snippet:

Code: C#
var pdfResults = Enumerable.Range(0, 5).Select(i =>
    HtmlToPdf.ConvertHtml($"<!DOCTYPE html>\r\n<html>\r\n<head>\r\n<meta charset=\"utf-8\"></head><body>{i}</body></html>", new PdfDocument()));

Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("ar");

var merged = PdfDocument.Merge(true, pdfResults.ToArray());
merged.Save("result.pdf");


4. Running this code will throw this exception:

System.ArgumentOutOfRangeException: 'Specified time is not supported in this calendar. It should be between 04/30/1900 00:00:00 (Gregorian date) and 11/16/2077 23:59:59 (Gregorian date), inclusive.
Parameter name: time'

A couple other notes:
- The exception is not thrown if we downgrade to a 25.1.* nuget version
- The exception was thrown with code "ar", but not with code "ar-eg".
- The exception was not thrown with a .NET 8 console app

Can you confirm this defect and provided a timeline on when it may be fixed?
eo_support
Posted: Wednesday, July 23, 2025 3:29:06 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,407
Thanks for letting us know. We have found the root of the problem and this issue will be fixed in our next build.
eo_support
Posted: Monday, August 11, 2025 10:43:57 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,407
Hi,

This is just to let you know that we have posted build 25.2.64 that should fix this issue. You can download the new build from our download page. Please take a look and let us know how it goes.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.