Convert 1107729-05.cgm -> 1107729-05.cgm.291ca41c656f76bf10c94e4c762fb3385d5ba04468607f3b47bb72f473380ab9.png
Unhandled exception. System.TypeInitializationException: The type initializer for 'Gdip' threw an exception.
---> System.PlatformNotSupportedException: System.Drawing.Common is not supported on non-Windows platforms. See https://aka.ms/systemdrawingnonwindows for more information.
at System.Drawing.LibraryResolver.EnsureRegistered()
at System.Drawing.SafeNativeMethods.Gdip.PlatformInitialize()
at System.Drawing.SafeNativeMethods.Gdip..cctor()
--- End of inner exception stack trace ---
at System.Drawing.SafeNativeMethods.Gdip.GdipStringFormatGetGenericTypographic(IntPtr& format)
at System.Drawing.StringFormat.get_GenericTypographic()
at #=zEwNLqErWs4VkNW$t9l63CYDUQohgmJ2Fyg==.#=zPIXVC9aI2hMv()
at #=zEwNLqErWs4VkNW$t9l63CYDUQohgmJ2Fyg==.#=zcdrYqZs=()
at #=zF_23b4AbamiJtuPkPhkbcL2cU9NuyRa8MIgpc74=.#=zbBjKg$DrEahe()
at #=zkPLd98hcAwFYmxcKJ6lhb3fDMnSNyvWURA==.#=zcGRGoq7_wiSOCTkRovp5Xzo=(Single& #=zqM$8AvkjD3RS, Single& #=zpSZbg1s=, Single& #=z0SWBbFQ=)
at #=zkPLd98hcAwFYmxcKJ6lhb3fDMnSNyvWURA==.#=zEKBE49it0E87()
at #=zQg1_NV98$dGck0XxcFN6bFu8S_Qm.#=zARnf7PQ=(String #=zfPHBzOA=, PointF #=z4DQj3lM=, SizeF #=zqkUEKqk=, Boolean #=zTyVWaR4=)
at #=zAZ9aMtDzEzKSRk3m0nBu5ebsekLY_E2KLQ==.#=zCtXo61c=()
at #=zf_VbcFfRgisHwTL2maLo6oSJ3ZPg.#=zflwauag=()
at #=zcq3eMbhTiqMljaFm5VpWYqUojJXSKDpDxg==.#=znoa8EWfwRPU8(#=zQg1_NV98$dGck0XxcFN6bFu8S_Qm #=zxxpfqD0=)
at #=zcq3eMbhTiqMljaFm5VpWYqUojJXSKDpDxg==.#=zBl6Ongc=(#=z3UxmM66L4HGFqo65x13eQp8= #=zuI0k2l0=, SizeF #=zpzfapoo=)
at #=z2MWL5U7kYGL_nT$HyyNdC1asm$UB40n2gcN89Q0UKKJU$6sbpn63P4JjlmME.#=zMA3Ixso=(Stream #=z9KgpBh7YFuNe, Stream #=z3f9nlwd9ekgm)
at Aspose.Pdf.Facades.PdfProducer.Produce(Stream inputStream, ImportOptions options, Stream outputStream)
at Aspose.Pdf.Document.#=znOufQ48=(Stream #=zkMw2ito=, LoadOptions #=zfoLwPss=, Boolean #=zKfLtE7wgFTwL)
at Aspose.Pdf.Document..ctor(String filename, LoadOptions options)
at ImageCache.convertCGMToPNG(String inputFilePath, String outputFilePath) in /home/ec2-user/sgml/udocs_sgml_html_prototypes/image-converter/conv-aspose/Cache.cs:line 65
at ImageCache.ConvertToPNG(String inputFilePath) in /home/ec2-user/sgml/udocs_sgml_html_prototypes/image-converter/conv-aspose/Cache.cs:line 41
Instead of Aspose.PDF for .NET, please use Aspose.Pdf.Drawing. You can uninstall existing Aspose.PDF package and install Aspose.Pdf.Drawing from NuGet to use in Linux like environments. Suggested API does not have dependency on System.Drawing.Common and is released for non-Windows environments like Linux. You would not have to change any code and it will keep working just like Aspose.PDF under the same license. In case you still face any issues, please share your sample files and code snippet with us. We will further proceed accordingly.