PDF Page Base Extract Text Sets Culture In Current Thread To Invariant

Hi,

We have discovered an issue when running our complete test suite that if an ExtractText method is called it causes the current Culture in the current thread to be set to invariant. This then causes any DateTime actions i.e. Parse to fail as if we pass in a UK date of "22/06/2022" an exception is thrown as the invariant culture date format is "MM/dd/yyyy".

However if we use the overloaded ExtractText(out TextLines) it does not change the culture. Please could you assist.

After further investigation it seems to be setting the culture to in variant when disposing. 


Syncfusion.Pdf.Imaging.Net.Core v.19.1.0.6



5 Replies

DM Dhivyabharathi Mohan Syncfusion Team June 23, 2021 10:53 AM UTC

Hi Darryl, 
 
 
Thank you for contacting Syncfusion support. 
 
 
We have checked by extracting the text from the PDF document. We were unable to reproduce the reported issue. We have shared the sample in which we tried to replicate this issue. 
 
 
 
 
Could you kindly try the sample and let us know whether you are facing the same issue? If yes, kindly share the PDF document in which you are facing this issue. It will be helpful for us to investigate further and provide the details at the earliest. 
 
 
Regards, 
Dhivya. 
 



DS Darryl Shehan June 23, 2021 04:17 PM UTC

Hi Dhivya,

Thanks for the quick repose, I have taken a look at the sample and I'm not using the same libraries or methods that you are. I though the best option would be to create an example to show the error. Please find the example attached and let me know if you need any more information.

Additional Update

After further investigation I can see that the CultureInfo.DefaultThreadCurrentCulture is being set to invariant when the ExtractText method is called. This then sets causes issues for when running tests as they will use the same thread. 

Thanks,

Darryl


Attachment: ExtractTextCulture_2af745e5.zip



DM Dhivyabharathi Mohan Syncfusion Team June 24, 2021 12:24 PM UTC

Hi Darryl, 
  
  
Thank you for the sample. We were able to reproduce the reported issue, “The current culture is changed after calling the extractText method”. We will analyze further and provide the details on June 28, 2021. 
  
  
Regards, 
Dhivya. 
  



DM Dhivyabharathi Mohan Syncfusion Team June 28, 2021 12:27 PM UTC

Hi Darryl, 
  
  
We have confirmed that the reported issue “Current culture value is changed after invoking extractText method” is a defect. The fix for this issue will be included in our upcoming weekly NuGet release on  14 July 2021. You can track the status using the below feedback link, 
  
  
  
 
  
  
Regards, 
Dhivya. 



DM Dhivyabharathi Mohan Syncfusion Team July 14, 2021 02:01 PM UTC

Hi Darryl, 
 
We have fixed the reported issue and the fix for the reported issue was included in our latest weekly release v19.2.0.47. Kindly upgrade to that version to get the issue resolved.  
 
  
  
  
  
Blazor Client   
Blazor Sever  
 
 
 
Service side package     
 
ASP.NET Core :    
  
 
    
 
      
ASP.NET MVC:     
 
  
   
 
 
Regards, 
Dhivya. 


Loader.
Up arrow icon