Hi Asad,
The Repair method works well, but unfortunately I run into another problem. The problem is blocking for using Aspose.PDF version 24.6 at all:
- We can no longer use the .NET framework version, because you choose to only deliver the component for framework 4.8.1. To update all customer servers we host from .NET Framework 4.8 to 4.8.1 is a large and time-consuming effort. Also some of our customers run their own Windows servers, with OS version only supporting framework up to version 4.8 (only the latest Windows Server -version 2022- supports it, see here).
- The .NET Standard version would be an alternative, but it doesn’t work well. There are several problems with .NET core component dependencies. This one is blocking for my conversion:
Exception thrown: 'System.PlatformNotSupportedException' in System.Drawing.Common.dll
Exception thrown: 'System.PlatformNotSupportedException' in Aspose.PDF.dll
System.PlatformNotSupportedException: System.Drawing is not supported on this platform.
at System.Drawing.Drawing2D.Matrix..ctor(Single m11, Single m12, Single m21, Single m22, Single dx, Single dy)
at #=zT9w49rKlgFa83yIBOp8WB3b8w6T89nycZg==.#=zZqiuyA8=(Single #=zpaoXjXI=, Single #=zkd08BC4=, Single #=zD0KpTHI=, Single #=zDkkDQ6Q=, Single #=z$gp9nRU=, Single #=zJe_rBOI=, #=zzO2BNbhloGuHYwqR4Dq3u715VuUK92Omuw== #=zJiFNW08=)
at #=zgMPS7SmlpF1VKLLlcly_sng_b662vSDkdLGKm7OGG4wx.#=zakmoYnwJ1cTA(#=zgMPS7SmlpF1VKLLlcly_spNBDvvvF0CV7w== #=zruQ1L_I=, #=zrpvj$vXCyWEIUiAU5sIvk6UsnZolxAY0gPrzCg8= #=zZtQM4mpAsd0C, #=zv0Y$LHT30Pvu$QZUfbvU7EIkWoPEY0jHhg== #=zSKSGGzE=, Single #=zxYsfsCz7c65P, Single #=zi7FCDpof4jrW, Boolean #=z20k6WTX1FuR1E1W95g==, Int32 #=zJv04WuNBeIxBcH0gDDb80EY=, Boolean #=zVpCGJgtuyKS6, Double& #=ze8Z9xHg=, Double& #=zhI9_MgY=, #=zmvCGE$WQe8nBgJeTXJMxVjw5TDyqFAzxHg==& #=zRKUK6OI=)
at #=zgMPS7SmlpF1VKLLlcly_sng_b662vS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nFyLQgLg0Y6kk1JTagJercNC0mLJHm6r$L7YdOjNOXmny8=.#=zSlnMB$THVJnuxLs2PRalTe8=()
at #=zHPGoxkiKnnFyLQgLg0Y6kk1JTagJercNC0mLJHm6r$L7YdOjNOXmny8=.#=zCndqlaQ=()
at #=zc20jbNI2c1pSKKi26XxxeSmRlTtitUo1VBSj4rJRf3wExz4KYJthhKY=.#=zAaiCFhuYQo3O()
at #=z6HQ73iZOcVn4IPseLrDIRR$vX_pBsgPiWx9hUs5KcGQhwh_y2VGxeUg=.#=z13ECSi0=()
at #=zc20jbNI2c1pSKKi26XxxeSmRlTtitUo1VBSj4rJRf3wExz4KYJthhKY=.#=z9Ny8urI=()
at #=z6HQ73iZOcVn4IPseLrDIRR$vX_pBsgPiWx9hUs5KcGQhwh_y2VGxeUg=.#=zXPJA8SM=(XmlTextWriter #=zWpHGEbI=, PdfFormat #=zGxuyFG0=, Document #=zH9VDBv4=, Boolean #=zKCS8GjGudgz7, ConvertErrorAction #=zYOlPgrQ=)
at Aspose.Pdf.Document.#=zHHW26sE=(XmlTextWriter #=zWpHGEbI=, PdfFormat #=zGxuyFG0=, Boolean #=zKCS8GjGudgz7, ConvertErrorAction #=zYOlPgrQ=)
at Aspose.Pdf.Document.Convert(Stream outputLogStream, PdfFormat format, ConvertErrorAction action)
I think the quickest fix would be to reconsider your decision to only deliver .NET Framework 4.8.1 and create a build for .NET Framework 4.8 as well. Or even better, deliver a .NET Framework 4.6.2 version, same as is done for Aspose.Words.
For now, we will be unfortunately unable to use Aspose.NET versions > 24.3, as 24.3 is the last version for which a .NET Framework 4.0 build is available.