Hi,
I'm facing a problem while trying to convert a MSWord .doc file to a PDF/A-1b using Aspose.Words.
I use this code:
Document doc = new Document(this.m_inputWordFileName);
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
pdfSaveOptions.Compliance = PdfCompliance.PdfA1b;
doc.Save(this.m_outputPdfFileName, pdfSaveOptions);
The framework gaves me the error (in french) "La référence d'objet n'est pas définie à une instance d'un objet", meaning null reference exception in english, with this stacktrace:
à x4adf554d20d941a6.xa4342d41912fa853.x1d76cba86350fef5(Int32 x9b0739496f8b5475)
à x4adf554d20d941a6.xa4342d41912fa853.x00358ffa9c9f03fc(Int32 x9b0739496f8b5475)
à x4adf554d20d941a6.xa4342d41912fa853.xc3819e13f60dd8e6()
à x4adf554d20d941a6.x3d1ad8ce75f0db3a.x1681db4c6032bcdb(x109e3389933c23a8 xdcf7b74ddd6caa25, xd4c1d21f07094800 x9b3f1d96a5b5faee, x954503abc583f675 x88a493fb6bc167aa)
à x4adf554d20d941a6.x4ddd0723770f9758.x3d62cd488a47fcfe()
à x4adf554d20d941a6.x4ddd0723770f9758.xc3819e13f60dd8e6(x3d1ad8ce75f0db3a xd3311d815ca25f02, Int32 xd284dd7d525c5491, Boolean x3175070523842c98, Boolean x4097fa47409be495)
à x4adf554d20d941a6.x3f7228e953be72ed.xd79114a9e7bc0d9e()
à x4adf554d20d941a6.x3f7228e953be72ed.xc3819e13f60dd8e6(x852fe8bb5ac31098 xe3e287548b3d01f5, Int32 xd284dd7d525c5491)
à x4adf554d20d941a6.x4af2add38e634ad4.xcbc2273143eac9ec(x852fe8bb5ac31098 xb6842aa1e60562e1)
à x4adf554d20d941a6.x4af2add38e634ad4.xc3819e13f60dd8e6(xc7f90d9c7c51cede xbbe2f7d7c86e0379)
à x4adf554d20d941a6.xea876d525d28ff96.xc3819e13f60dd8e6(x398b3bd0acd94b61 xd7e5673853e47af4)
à x4adf554d20d941a6.xac6c82c74ce247fb.xc3819e13f60dd8e6(Boolean xfad304b5f8f3bb5b)
à x4adf554d20d941a6.xa268fdb9ca040dde.xc3819e13f60dd8e6(Boolean xfad304b5f8f3bb5b)
à x59d6a4fc5007b7a4.xcde671c53995c411.xd9db07500873ae98(Document x3664041d21d73fdc, xdeb77ea37ad74c56 xdfde339da46db651)
à Aspose.Words.Document.UpdatePageLayout()
à Aspose.Words.Document.x410db0f4a89a6ef1(Boolean x24af0daafcd8fb8c)
à Aspose.Words.Document.get_xcde671c53995c411()
à Aspose.Words.Document.get_PageCount()
à xf989f31a236ff98c.x6c74398bceb133f8.xa2e0b7f7da663553(x8556eed81191af11 x5ac1382edb7bf2c2)
à Aspose.Words.Document.xf381a641001e6830(Stream xcf18e5243f8d5fd3, String xafe2f3653ee64ebc, SaveOptions xc27f01f21f67608c)
à Aspose.Words.Document.Save(String fileName, SaveOptions saveOptions)
I'm currently using version 10.1.1.0 but I also tried latest version (11.1.0) and the problem still remains. I use the .net 3.5 client profile dlls and encountered this error on only one .doc file, all the others are correctly converted.
Regards,
Bertrand