Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Wed Jun 09, 2021 10:12 am

I have this piece of code for converting a docx file to pdf
Code: Select all
   
                Spire.Doc.Document document = new Spire.Doc.Document();
                document.LoadFromFile(docxFilePath);
                document.SaveToFile(pdfFilePath, new Spire.Doc.ToPdfParameterList()
                {
                    UsePSCoversion = true
                });

Worked fine on local but when I deployed to Azure web app service, it threw exceptions messages (pls see the attachment)
**Already setting up license on Startup.cs
Using pro. edition - Spire.Doc 9.6.1


Could anyone help me out ?
Thanks!

phil.plund
 
Posts: 1
Joined: Wed Jun 09, 2021 10:06 am

Thu Jun 10, 2021 3:18 am

Hello,

Thanks for your inquiry.
To help us investigate your issue more accurately and quickly, please provide your input file which can reproduce your issue. You could send it to us (support@e-iceblue.com) via email. Thanks in advance.

Sincerely,
Brian
E-iceblue support team
User avatar

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

Fri Jun 11, 2021 10:43 am

Hello Phillip,

Thanks for providing your input file via email.

Your project framework is .NET Core and you installed our products via Nuget, right? I created an ASP .NET Core Web Application and deployed it on Azure for testing, I did reproduce your issue. I have logged it in our bug tracking system with the ticket SPIREDOC-6150. If there is any update, we will let you know. Apologize for the inconvenience caused.

Or if there is any misunderstanding, please provide more details for further investigation. Thanks in advance for your assistance.

Sincerely,
Brian
E-iceblue support team
User avatar

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

Fri Jun 25, 2021 10:10 am

Is there any update on this issue?

We recently upgraded our Spire Azure function from version 7 to the latest 9 and got the same error message.

Version 7.12.23 seems to be the last working version (.NETCoreApp, Azure Function V3)

Code: Select all
  <PropertyGroup>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    <AzureFunctionsVersion>v3</AzureFunctionsVersion>
    <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.13" />
    <PackageReference Include="Spire.Doc" Version="7.12.23" />
  </ItemGroup>

dinden
 
Posts: 16
Joined: Wed Aug 07, 2019 7:42 am

Mon Jun 28, 2021 3:34 am

Hello Dan,

Thanks for your inquiry and sorry for the late reply as weekwend.
Regarding the issue SPIREPDF-4315, our developers have made changes to the internal code and this issue is currently in the testing phase. But this issue is related to the structure of the input file, we are not sure whether this fix will work for you. To help us further verify and help you solve your issue, please provide us with your input file. You can send it to us (support@e-iceblue) via email. Thanks in advance for your assistance.

Sincerely,
Brian
E-iceblue support team
User avatar

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

Mon Jun 28, 2021 11:04 am

Hello Dan,

Thanks for providing your input file via email.
We have verified locally that the fix for issue SPIREDOC-6150 can work for your Word file. When the new version containing the fix is available, we will notify you immediately. 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

Fri Jul 16, 2021 9:04 am

Hello Dan,

Greetings from E-iceblue!
Does this hotfix solve your issue? Could you please give us some feedback at your convenience?

Sincerely,
Brian
E-iceblue support team
User avatar

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

Fri Sep 10, 2021 8:57 am

Unfortunately it still crashes with a System.NullReferenceException: 'Object reference not set to an instance of an object.'
Running Spire version 9.8.6

After the Exception my whole function crashes with an AccessViolationException on anything else I do (trying to log the previous error).
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Stacktrace:
at spr⒣.ᜀ(FontStyle A_0)
at sprᝧ.ᜀ(spr⒣ A_0, Single A_1, FontStyle A_2)
at sprᝧ.ᜀ(String A_0, Single A_1, FontStyle A_2)
at Spire.Doc.Formatting.CharacterFormat.ᜈ()
at spr⁂.ᜁ(TextRange A_0, sprᾔ A_1, RectangleF& A_2, Boolean A_3, spr᯼ A_4)
at spr⁂.ᜀ(TextRange A_0, IDocumentObject A_1, Paragraph A_2, String A_3, Boolean A_4)
at spr᧳.ᜀ(Paragraph A_0, spr᧴ A_1)
at spr᧳.ᜀ(Table A_0, TableCell A_1, spr᧷ A_2, Single A_3, Single A_4)
at spr᧳.ᜀ(Table A_0, spr᧵ A_1, Single A_2)
at spr᧳.ᜂ(Table A_0, Single A_1)
at spr᧳.ᜅ(Table A_0, Single A_1)
at spr᧳.ᜂ(RectangleF A_0)
at spr᧯.ᜋ(spr᧮ A_0)
at spr᧯.ᜁ(RectangleF A_0)
at spr᧯.ᜋ(spr᧮ A_0)
at spr᧯.ᜁ(RectangleF A_0)
at spr᧟.ᜀ(spr᧐ A_0, spr᧊ A_1, spr⁂ A_2)
at spr›.ᜒ()
at spr›.ᜓ()
at spr›.ᜀ(IDocument A_0)
at sprₐ.ᜀ(Document A_0, Stream A_1, ToPdfParameterList A_2)
at Spire.Doc.Document.ᜀ(Stream A_0, ToPdfParameterList A_1)
at Spire.Doc.Document.SaveToStream(Stream stream, ToPdfParameterList paramList)
at Klout7Pdf.ConvertToPdf.<Run>d__0.MoveNext() in D:\Sources\Senet\AzurePdf\Klout7Pdf\Klout7Pdf\ConvertToPdf.cs:line 34

dinden
 
Posts: 16
Joined: Wed Aug 07, 2019 7:42 am

Fri Sep 10, 2021 10:55 am

Hello,

Thanks for your feedback.
I tested your case with the Word file "F-2021-116976.doc" you provided to us before, but I did not encounter any issue when using the version 9.8.6.
Are you encountering this issue while testing other files? If so, please provide us with the corresponding files to help us investigate further. Thanks in advance.

Sincerely,
Brian
E-iceblue support team
User avatar

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

Return to Spire.Doc