Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Mon Jul 12, 2021 12:02 pm

Hello,
I've just bought Spire Office 6.6 license and downloaded the 6.6 version from your site, as I do every year.

Every works fine in:
- web sites, in debug and also published on servers;
- in window form applications and class libraries if I execute them in debug or from my p.c.,

But if I execute a class or a window form application on a server (windows server 2016 and windows server 2003...) the spire dlls do not work: the pdf file is not being created and this error is generated: "Invalid date string, after time". I removed every instruction from my code referred to date and time, but nothing changes.
Then, I also removed each instruction of spire.doc/pdf from my code, I only left a "new document()" and a "save as pdf instruction, to save an empty document, but nothing, the error still remains.
I'm sending you my code in attachment.
Can you pleae help me?
thank you,
kind regards,
Paola

paolagumi
 
Posts: 85
Joined: Tue Apr 21, 2015 11:32 am

Tue Jul 13, 2021 5:48 am

Hello Paola,

Thanks for your inquiry.
I tested your case and did reproduce your issue. I have logged it in our bug tracking system with the ticket SPIREDOC-6340. If there is any update, we will let you know. Apologize for the inconvenience caused.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Tue Jul 13, 2021 8:08 am

ok, thanks
I wait for your solution!
best regards,
Paola

paolagumi
 
Posts: 85
Joined: Tue Apr 21, 2015 11:32 am

Tue Jul 13, 2021 10:53 am

Okay,
We will keep you informed if there is any update.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Wed Jul 14, 2021 7:20 am

Hello Brian,
in the meantime I found a solution, looking for in your forum:
in vb it's sufficient adding these instructions in our code:

Imports System.Globalization.CultureInfo (I already had it)
Imports System.Threading (added)

----
Thread.CurrentThread.CurrentUICulture = System.Globalization.CultureInfo.InvariantCulture
Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture

the original instructions in C that I found are:
using (var memStream = new MemoryStream())
{
var uiCulture = Thread.CurrentThread.CurrentUICulture;
var culture = Thread.CurrentThread.CurrentCulture;
Thread.CurrentThread.CurrentUICulture = CultureInfo.InvariantCulture;
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
doc.SaveToStream(memStream);

Thread.CurrentThread.CurrentUICulture = uiCulture;
Thread.CurrentThread.CurrentCulture = culture;
return memStream.ToArray();
}
Basically, we only need the two "thread" statements.

So, my w.f. applications and classes now run correctly and produce pdf documents also if run on servers.
Just a question: is it possibile that since this new versione we have to use the Net4.0, instead the Net4.0 client profile that I'ìve always used also on servers....?
thank you and kind regards,
Paola

paolagumi
 
Posts: 85
Joined: Tue Apr 21, 2015 11:32 am

Wed Jul 14, 2021 11:09 am

Hello Paola,

Thanks for your feedback. I am glad to hear that you have found a solution.

Besides, our Spire.Office provides both NET4.0 dlls and NET4.0 Client Profile dlls. Which dlls should be referenced depends on your project target framework. If your project target framework is NET4.0 Client Profile, then you should reference the NET4.0 Client Profile dlls.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Wed Jul 14, 2021 12:08 pm

ok, I'm using net 4.0 client profile as my project target framework is NET4.0 Client Profile.

paolagumi
 
Posts: 85
Joined: Tue Apr 21, 2015 11:32 am

Thu Jul 15, 2021 1:34 am

Thanks for your response.
If you encounter any issues related to our products in the future, please feel free to contact us.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Fri Aug 20, 2021 12:46 pm

Hello,

Greetings from E-iceblue!
Glad to inform you that we just released Spire.Office Platinum(Hotfix) Version:6.8.2 which fixes your issue, please download it from the following links to test on your side. Looking forward to your test result.

Website link: https://www.e-iceblue.com/Download/down ... t-now.html
Nuget link: https://www.nuget.org/packages/Spire.Office/6.8.2
https://www.nuget.org/packages/Spire.Of ... Core/6.8.2


Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Return to Spire.PDF

cron