Aspose.Words を使用して、ubuntu で doc/docx ファイルを pdf ファイルに変換しています。Mono ランタイムがインストールされました。私のコードは以下の通りです:
Document doc = new Document ("/data/upfile/test.docx");
doc.Save ("/data/upfile/test.pdf", SaveFormat.Pdf);
どういうわけか、コードの 2 行目を実行すると、エラーがスローされました。詳細は次のとおりです。
未処理の例外: System.ArgumentOutOfRangeException: startIndex + length > this.length パラメーター名: System.String.Substring での長さ (Int32 startIndex, Int32 length) [0x00000] in :0 at x6c95d9cf46ff5f25.x0d299f323d241756.x3b67e683e83cab62 (System.String xe41115 x961016a387451f05) [0x00000] in :0 at x4adf554d20d941a6.x50e6e6d123fa4a35.x4469479613bec4d8 (Aspose.Words.Node xda5bf54deb817e37) [0x00000] in :0 at x4adf554d20d941a6.x50e6e6d123fa4a35.x7be41bff00df2c71 (Aspose.Words.Node xda5bf54deb817e37) [0x00000] in :0 at x4adf554d20d941a6 .x50e6e6d123fa4a4a35.x699caa1974f95d1a(aspose.words.node xda5bf554deb817e37)[0x00000] in:0 at x4adf54d20d941a6.x50e6e6d123f3f355.x1014448555555555555555.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f.f
at x4adf554d20d941a6.x50e6e6d123fa4a35.xb5ef8a04e65b87e6 (System.String x1f25abf5fb75e795, System.Object xa860e35844c20ac7) [0x00000] in :0 at x59d6a4fc5007b7a4.xdeb77ea37ad74c56.xbbf9a1ead81dd3a1 (System.String x1f25abf5fb75e795, System.Object xa860e35844c20ac7) [0x00000] in :0 at x59d6a4fc5007b7a4.x487cdc969fefe3d6 .xbbf9a1ead81dd3a1 (System.String x1f25abf5fb75e795, System.Object xa860e35844c20ac7) [0x00000] in :0 at x59d6a4fc5007b7a4.x487cdc969fefe3d6.xf3a1cfbffa44728c () [0x00000] in :0 at x59d6a4fc5007b7a4.x487cdc969fefe3d6.x47f176deff0d42e2 () [0x00000] in :0 at x59d6a4fc5007b7a4. x487cdc969fefe3d6.x83f07df6a659e05b () [0x00000] in :0 at x59d6a4fc5007b7a4.xcde671c53995c411.xd9db07500873ae98 (Aspose.Words.Document x3664041d21d77b7afdc4, x5906xdeb77ea37ad74c56 xdfde339da46db651) [0x00000] in :0 at Aspose.Words.Document.UpdatePageLayout () [0x00000] in :0 at Aspose.Words.Document.x410db0f4a89a6ef1 (Boolean x24af0daafcd8fb8c) [0x00000] in :0 at Aspose.Words.Document. get_xcde671c53995c411 () [0x00000] in :0 at Aspose.Words.Document.get_PageCount () [0x00000] in :0 at xf989f31a236ff98c.x6c74398bceb133f8.xa2e0b7f7da663553 (x28925c9b27b37a46.x8556eed81191af11 x5ac1382edb7bf2c2) [0x00000] in :0 at Aspose.Words.Document. xf381a641001e6830 (System.IO.Stream xcf18e5243f8d5fd3、System.String xafe2f3653ee64ebc、Aspose.Words.Saving.SaveOptions xc27f01f21f67608c) [0x00000] in :0 at Aspose.Words.Document.Save (System.String fileName, Aspose.WordsSaveOptions.Sa. saveOptions) [0x00000] in :0 at Aspose.Words.Document.Save (System.String fileName,SaveFormat saveFormat) [0x00000] in :0
MonoTest.MainClass.Main (System.String[] args) [0x00000] in:0 [エラー] 致命的な未処理の例外: System.ArgumentOutOfRangeException: startIndex + length > this.length パラメーター名: System.String.Substring での長さ (Int32 startIndex, Int32 length) [0x00000] in :0 at x6c95d9cf46ff5f25.x0d299f323d241756.x3b67e683e83cab62 (System.String xe4115acdf4fbfccc, Int32 x961016a387451f05) [0x00000] in :0 at x4adf554d20d941a6.x50e6e6d123fa4a35.x4469479613bec4d8 (Aspose.Words.Node xda5bf54deb817e37) [0x00000] in :0 at x4adf554d20d941a6.x50e6e6d123fa4a35.x7be41bff00df2c71 (Aspose.Words.Node xda5bf54deb817e37) [0x00000] in :0 at x4adf554d20d941a6.x50e6e6d123fa4a35.x699caa1974f95d1a (Aspose.Words.Node xda5bf54deb817e37) [0x00000] in :0 at x4adf554d20d941a6.x50e6e6d123fa4a35.x21e4bd206d6231f8 (System .オブジェクト xa860e35844c20ac7) [0x00000] in :0
at x4adf554d20d941a6.x50e6e6d123fa4a35.xb5ef8a04e65b87e6 (System.String x1f25abf5fb75e795, System.Object xa860e35844c20ac7) [0x00000] in :0 at x59d6a4fc5007b7a4.xdeb77ea37ad74c56.xbbf9a1ead81dd3a1 (System.String x1f25abf5fb75e795, System.Object xa860e35844c20ac7) [0x00000] in :0 at x59d6a4fc5007b7a4.x487cdc969fefe3d6 .xbbf9a1ead81dd3a1 (System.String x1f25abf5fb75e795, System.Object xa860e35844c20ac7) [0x00000] in :0 at x59d6a4fc5007b7a4.x487cdc969fefe3d6.xf3a1cfbffa44728c () [0x00000] in :0 at x59d6a4fc5007b7a4.x487cdc969fefe3d6.x47f176deff0d42e2 () [0x00000] in :0 at x59d6a4fc5007b7a4. x487cdc969fefe3d6.x83f07df6a659e05b () [0x00000] in :0 at x59d6a4fc5007b7a4.xcde671c53995c411.xd9db07500873ae98 (Aspose.Words.Document x3664041d21d77b7afdc4, x5906xdeb77ea37ad74c56 xdfde339da46db651) [0x00000] in :0 at Aspose.Words.Document.UpdatePageLayout () [0x00000] in :0 at Aspose.Words.Document.x410db0f4a89a6ef1 (Boolean x24af0daafcd8fb8c) [0x00000] in :0 at Aspose.Words.Document. get_xcde671c53995c411 () [0x00000] in :0 at Aspose.Words.Document.get_PageCount () [0x00000] in :0 at xf989f31a236ff98c.x6c74398bceb133f8.xa2e0b7f7da663553 (x28925c9b27b37a46.x8556eed81191af11 x5ac1382edb7bf2c2) [0x00000] in :0 at Aspose.Words.Document. xf381a641001e6830 (System.IO.Stream xcf18e5243f8d5fd3、System.String xafe2f3653ee64ebc、Aspose.Words.Saving.SaveOptions xc27f01f21f67608c) [0x00000] in :0 at Aspose.Words.Document.Save (System.String fileName, Aspose.WordsSaveOptions.Sa. saveOptions) [0x00000] in :0 at Aspose.Words.Document.Save (System.String fileName,SaveFormat saveFormat) [0x00000] in :0
MonoTest.MainClass.Main (System.String[] args) [0x00000] で:0
アドバイスをいただければ幸いです。ありがとう。