We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Convert PPT or Word to PDF in Linux .NET Core 2.0/3.0 - System.NullReferenceException Occurs

netstandard2.1 aspose.pdf 19.12.0 pdf convert ppt or word in linux netcore3.0

Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
at #=zTqlBPv_CEK4gvqR64nc57RdPXj_KIKDTiSqx9$7fbxor.#=z0$gdpHksiCyR()
at #=zDgETdhojm66Tp3V5SzwzmHOLqp58DYzurWt4RR3ed4hzZHzYCw==.#=zvVZznik=(#=zP0w51rEYMdOGRAWsoHgWScTjAYJ5mLpOsy69bY5lfPha #=zuyF8cUI=, #=zxCv6S2z7NdWmfwwqWneIpopDnHMXIwPR5ST0$BU4LGzZ #=z4Jjrsxi4PIjb, #=ztgy6IBeb6zU9rFQ7gqoHDfOWvbUBA_WS6g== #=zHJbjBA4=)
at #=zN$DY_sU7KmBnCOkR54jzGKJGCII0I0DTnpccSmU2_yqSRElgKA==.#=zvVZznik=(#=zP0w51rEYMdOGRAWsoHgWScTjAYJ5mLpOsy69bY5lfPha #=zuyF8cUI=, #=zxCv6S2z7NdWmfwwqWneIpopDnHMXIwPR5ST0$BU4LGzZ #=z4Jjrsxi4PIjb)
at #=z7dhpk_vfEIz7FfPz6cbysN2Nf$sbQdmzGJblFZb7gfpq.#=zeXcpboSxskfpIy7cVw==(#=zP0w51rEYMdOGRAWsoHgWScTjAYJ5mLpOsy69bY5lfPha #=zuyF8cUI=, List1 #=zL5VoqVc=) at #=z7dhpk_vfEIz7FfPz6cbysN2Nf$sbQdmzGJblFZb7gfpq.#=zmS9dLL6Sk02gSAq7wQ==(#=zP0w51rEYMdOGRAWsoHgWScTjAYJ5mLpOsy69bY5lfPha #=zuyF8cUI=, List1 #=zL5VoqVc=)
at #=z7dhpk_vfEIz7FfPz6cbysN2Nf$sbQdmzGJblFZb7gfpq.#=z2wd7SZdcULKx(#=zP0w51rEYMdOGRAWsoHgWScTjAYJ5mLpOsy69bY5lfPha #=zuyF8cUI=, List1 #=zo1Qtwsapv_rn) at #=z7dhpk_vfEIz7FfPz6cbysN2Nf$sbQdmzGJblFZb7gfpq.#=zntu3$XA=(#=zWsGx78$9cb_yLqvAiD9kqAdru2U3 #=zbZYPx9c=, #=zO_mmyHiA5q2pmtzON18$13sH371BG9mwqQ== #=zjhTNXYw=, #=zP0w51rEYMdOGRAWsoHgWScTjAYJ5mLpOsy69bY5lfPha #=zuyF8cUI=) at #=zkvm22Qpd1jVKe44LG9JPSStq4kfthbGZiA==.#=z$W9dsBc=(Int32 #=zp2uSYOQ=, IList1 #=zismr8cXzH8a0giXfDQ==, #=zZdPBEGpL5_vb #=zIE_yuJs=)
at #=zkvm22Qpd1jVKe44LG9JPSStq4kfthbGZiA==.#=zntu3$XA=()
at #=z95aoBCaj_T6C8lXav2bdxS8twVtK.#=z42THApi7NGNE(Document #=zbZYPx9c=, #=zP0w51rEYMdOGRAWsoHgWScTjAYJ5mLpOsy69bY5lfPha& #=zL6pYba071TUYak9Eyg==, UnifiedSaveOptions #=zajugR0g=, Int32& #=z1RlzfLK9obyb, Boolean #=zhEm4glc=)
at #=z95aoBCaj_T6C8lXav2bdxS8twVtK.#=zVRq2Uvmk5VNcn$C8Ow==(Document #=z0Zfxy4qSH0DN, #=zP0w51rEYMdOGRAWsoHgWScTjAYJ5mLpOsy69bY5lfPha& #=zuyF8cUI=, UnifiedSaveOptions #=zajugR0g=, Int32& #=zGayMdopGNEYv, Boolean #=zhEm4glc=)
at #=zFp33z$Jyly$Mhvkur7WtPN8=.#=zrsjOkyM=(Document #=z0Zfxy4qSH0DN, Stream #=zwElFahvPGTRX, DocSaveOptions #=zajugR0g=)
at Aspose.Pdf.Document.#=zEszYJEKR61hZ(Stream #=zwElFahvPGTRX, SaveOptions #=zajugR0g=)
at Aspose.Pdf.Document.#=zEszYJEKR61hZ(String #=zrrBoMbipHx43, SaveFormat #=zSCLZf4Q=)
at Aspose.Pdf.Document.Save(String outputFileName, SaveFormat format)
at pdf2word.pdf2word.main(pdf2word_options o) in G:\dotnet\newlast\pdf2word.cs:line 22

mycode:
Aspose.Pdf.Document document = new Aspose.Pdf.Document(“123.pdf”);
document.Save(“456.docx”, Aspose.Pdf.SaveFormat.DocX);

@bama,

Can you please share source file, sample code along with environment details so that we may further investigate to help you out.

netstandard2.1 aspose.pdf 19.12.0 pdf convert ppt or word in linux netcore3.0

my source code:
Aspose.Pdf.Document document = new Aspose.Pdf.Document(“123.pdf”);
document.Save(“456.docx”, Aspose.Pdf.SaveFormat.DocX);

我使用最新版本的aspose.pdf.dll 19.12.0 进行测试,发现在任何linux上测试都是这个问题,无论是net core2.1 还是net core3.0
您可以使用如下代码进行测试
Aspose.Pdf.Document document = new Aspose.Pdf.Document(“123.pdf”);
document.Save(“456.docx”, Aspose.Pdf.SaveFormat.DocX);

无论是转换成doc还是excel都会出现这个异常,
这个问题应该很好发现,请您测试一下

@bama,

Can you please share source PDF file which you are using on your end so that we may further investigate to help you out.

Process terminated. Assertion failed.
Cannot read a name from the name table in a font.
at #=z3vZEHck$0O8CtxgIGlkxmalclnoOWXbLVw==.#=z3SoL9LmcWpQ7(Int32 #=ztynTN34=)
at #=z3vZEHck$0O8CtxgIGlkxmalclnoOWXbLVw==.#=zaUWd670=()
at #=z3vZEHck$0O8CtxgIGlkxmalclnoOWXbLVw==.#=zfGJscVTB5PWj(#=zbhRTTtcSQH36hNtHjT5P5Qc= #=zxY9HVrA=)
at #=zaRkftOMfeSpUyDwMXBKa_gQUmk7K.#=zfGJscVTB5PWj(#=zbhRTTtcSQH36hNtHjT5P5Qc= #=zxY9HVrA=)
at #=z3KkE4ihkcGQoItZFBtOggVtNha05.#=zJrih9DCU0evT(#=zbhRTTtcSQH36hNtHjT5P5Qc= #=zxY9HVrA=)
at #=zaRkftOMfeSpUyDwMXBKa_gQUmk7K.#=zHzcuiPId2tTjDBQgWg==(#=zbhRTTtcSQH36hNtHjT5P5Qc=[] #=zdCOWKFYrDi9I)
at #=z3KkE4ihkcGQoItZFBtOggVtNha05…ctor(#=zbhRTTtcSQH36hNtHjT5P5Qc=[] #=zdCOWKFYrDi9I)
at #=zoAmUqq0pcPPK3FMhsQj67ail9f30.#=zc3NuEgVH0Qkm(#=zbhRTTtcSQH36hNtHjT5P5Qc=[] #=zS6VFee34uuWR)
at #=zoAmUqq0pcPPK3FMhsQj67ail9f30.#=zc3NuEgVH0Qkm()
at #=zoAmUqq0pcPPK3FMhsQj67ail9f30.#=zUzdUlmj9jT_T()
at #=zoAmUqq0pcPPK3FMhsQj67ail9f30.#=zxBoB3nk=(String #=z74wbRXo=, FontStyle #=z4ezpGQA=)
at #=zq8j7PkIurbvBaHrGc2xjo1mImmLz.#=z3x4aDbaxNv4Q(String #=z74wbRXo=, FontStyle #=z4ezpGQA=, String #=zj8KuHMkDKrma)
at #=zq8j7PkIurbvBaHrGc2xjo1mImmLz.#=zhgkiNOf9F$iK(String #=z74wbRXo=, Single #=zdddcRNEtxQKK, FontStyle #=z4ezpGQA=, String #=zj8KuHMkDKrma)
at #=zq8j7PkIurbvBaHrGc2xjo1mImmLz.#=zhgkiNOf9F$iK(String #=z74wbRXo=, Single #=zdddcRNEtxQKK, FontStyle #=z4ezpGQA=)
at #=zxAGSfe2YmMklG7pIt2CgqaiWoLd6…cctor()
at #=zxAGSfe2YmMklG7pIt2CgqaiWoLd6.#=zAa3HSQk=()
at #=zjk6htR0oiVuAGh9aVdFoOWSJtFVZ4IgqUP7VbgA=.#=zrsjOkyM=(IList1 #=z20u9k2v1BaAq, #=z5PbD8fMnP_i3bF9SpdbU6vlaTv4PsMxS8g== #=zZSRHXTc=, #=zl6EOJIEkHwFDnKvJsU53Znxp4JoySX21GMSb6ow= #=zajugR0g=) at #=ze0aD4oNX48WD3dyBFJWwvSfmiiFZrFotOw==.#=zVzcDnnJmjZpyxuJOfg==(List1 #=zsLij4fI=)
at #=zFp33z$Jyly$Mhvkur7WtPN8=.#=zdg9MeFwn2FG2kwEpLLttNcyPFATL(#=ze0aD4oNX48WD3dyBFJWwvSfmiiFZrFotOw== #=zA2s8ICcSOc6y, Queue1 #=zmlnudL_oe8dw) at #=zFp33z$Jyly$Mhvkur7WtPN8=.#=zrsjOkyM=(Document #=z0Zfxy4qSH0DN, Stream #=zwElFahvPGTRX, DocSaveOptions #=zajugR0g=) at Aspose.Pdf.Document.#=zEszYJEKR61hZ(Stream #=zwElFahvPGTRX, SaveOptions #=zajugR0g=) at Aspose.Pdf.Document.#=zEszYJEKR61hZ(String #=zrrBoMbipHx43, SaveFormat #=zSCLZf4Q=) at Aspose.Pdf.Document.Save(String outputFileName, SaveFormat format) at pdf2word.pdf2word.main(pdf2word_options o) in G:\dotnet\test\pdf2word.cs:line 23 at newlast.Program.<>c.<Main>b__0_28(pdf2word_options o) in G:\dotnet\test\Program.cs:line 563 at CommandLine.ParserResultExtensions.MapResult[T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,TResult](ParserResult1 result, Func2 parsedFunc1, Func2 parsedFunc2, Func2 parsedFunc3, Func2 parsedFunc4, Func2 parsedFunc5, Func2 parsedFunc6, Func2 parsedFunc7, Func2 parsedFunc8, Func2 parsedFunc9, Func2 parsedFunc10, Func2 parsedFunc11, Func2 parsedFunc12, Func2 parsedFunc13, Func2 parsedFunc14, Func2 parsedFunc15, Func2 parsedFunc16, Func2 parsedFunc17, Func2 parsedFunc18, Func2 parsedFunc19, Func2 parsedFunc20, Func2 parsedFunc21, Func2 parsedFunc22, Func2 parsedFunc23, Func2 parsedFunc24, Func2 parsedFunc25, Func2 parsedFunc26, Func2 parsedFunc27, Func2 parsedFunc28, Func2 parsedFunc29, Func2 parsedFunc30, Func2 parsedFunc31, Func2 parsedFunc32, Func2 parsedFunc33, Func2 parsedFunc34, Func2 parsedFunc35, Func2 parsedFunc36, Func2 parsedFunc37, Func2 parsedFunc38, Func2 parsedFunc39, Func2 parsedFunc40, Func2 parsedFunc41, Func2 parsedFunc42, Func2 parsedFunc43, Func2 parsedFunc44, Func2 parsedFunc45, Func2 parsedFunc46, Func`2 notParsedFunc)
at newlast.Program.Main(String[] args) in G:\dotnet\test\Program.cs:line 584

test_4736.pdf (137.3 KB)
new_test.pdf (67.8 KB)

mycode

        Aspose.Pdf.Document document = new Aspose.Pdf.Document(input_file);
        document.Save(out_file, Aspose.Pdf.SaveFormat.DocX);

in linux

@bama,

I like to inform that you have shared two files and it is not clear which file you want to convert to DOCX format. Can you please clear things what you want to convert in which format.

这两个pdf转换会出现同样的问题,你可以任意选择一个来进行测试

@bama,

我已经处理了两个示例文件,并将它们转换为DOCX,无法观察到任何问题。我还与您分享了我生成的结果,供您参考。new_test_2.zip (266.3 KB)

是在linux环境里测试的吗?

@bama,

您能否与我们分享完整的环境详细信息。

dotnet core 3.0 在windows测试是正常的,而在linux dotnet core 3.0 则出现问题

@bama,

您能确认在Windows环境下是否可以正常工作。我们正在设置linux环境,以便对此进行进一步调查。

我已经确定windows环境正常,而在linux环境会出现问题,请尽快解决,感觉

@bama,

Thanks for contacting support.

We have tested this scenario in our environment and have been able to observe the issue that you have mentioned. We have logged issue with ID PDFNET-47510 in our issue tracking system. We will share with you as soon as logged issue is fixed.