Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files from any .NET platform (C#, VB.NET, ASP.NET, .NET Core) and Java applications (J2SE and J2EE) with fast and high quality performance.

Mon Mar 01, 2021 9:38 am

Good day,
we get System.NullReferenceException when we use Spire.Doc in Terrasoft Creatio. However, the same code works as expected in a console application. Can you tell me what the problem might be?

Code:
public static byte[] Convert(byte[] data)
{
var input = new MemoryStream(data);
input.Position = 0;
MemoryStream output = new MemoryStream();
Document doc = new Document(input);
doc.SaveToStream(output, FileFormat.PDF);
output.Position = 0;
return output.ToArray();
}

Spire.Doc 9.2.0

Stack trace:
System.NullReferenceException: Object reference not set to an instance of an object.
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 Spire.Doc.Fields.TextRange.ᜁ(sprᰌ A_0)
at sprឣ.ᜏ()
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)
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.ᜁ(Stream A_0)
at Spire.Doc.Document.SaveToStream(Stream stream, FileFormat fileFormat)
at Terrasoft.Core.Process.Process_7a9eb51MethodsWrapper.ScriptTask1Execute(ProcessExecutingContext context)
at Terrasoft.Core.Process.ProcessScriptTask.InternalExecute(ProcessExecutingContext context) in /opt/buildagent/work/ApplicationCoreLinux/TSBpm/Src/Lib/Terrasoft.Core/Process/ProcessScriptTask.cs:line 31
at Terrasoft.Core.Process.ProcessFlowElement.ExecuteItem(ProcessExecutingContext context) in /opt/buildagent/work/ApplicationCoreLinux/TSBpm/Src/Lib/Terrasoft.Core/Process/ProcessFlowElement.cs:line 441
at Terrasoft.Core.Process.ProcessFlowElement.Execute(ProcessExecutingContext context) in /opt/buildagent/work/ApplicationCoreLinux/TSBpm/Src/Lib/Terrasoft.Core/Process/ProcessFlowElement.cs:line 952

dkostyunin
 
Posts: 1
Joined: Wed Feb 03, 2021 8:40 am

Mon Mar 01, 2021 10:31 am

Hello,

Thanks for your inquiry.

Sorry we don't know much about Terrasoft Creatio, could you please provide some guidance on this?

And to help us investigate further, please provide the following information. Thanks in advance for your assistance.
1) The sample project that you used in Terrasoft Creatio.
2) Your input file.
3) Your test steps, some online tutorials or some screenshots may help a lot.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1514
Joined: Tue Jul 09, 2019 2:22 am

Thu Mar 18, 2021 3:29 am

Hello,

Hope you are doing well.
How is your issue now? Could you please give us some feedback at your convenience?

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1514
Joined: Tue Jul 09, 2019 2:22 am

Return to Spire.Doc