License license = new License();
license.SetLicense(“Aspose.Total.NET.lic”);
string pdf_fonts_folder = “usr/share/fonts/truetype/msttcorefonts”;
Aspose.Pdf.Text.FontRepository.Sources.Add(new Aspose.Pdf.Text.FolderFontSource(pdf_fonts_folder));
using var stream1 = new MemoryStream(Encoding.UTF8.GetBytes(“Initializing Aspose PDF”));
HtmlLoadOptions loadOptions = new HtmlLoadOptions();
Document document = new Document(stream1, loadOptions);
When we try to initiate htmlloadoption into document in .Net 8 Linux Server, we faced the error below:
System.PlatformNotSupportedException: System.Drawing.Common 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 #=zjBUsORi2vRbxKae$hipe7_yndd1crLQhsw==.#=zSQk4fZEOoQf2gZrTUUorSl4=(SizeF #=zxCU6SUE=)
at #=zjBUsORi2vRbxKae$hipe7_yndd1crLQhsw==.#=znUJpZK0=(SizeF #=zxCU6SUE=)
at #=zWD2j2Ft8sKhO3xRH6YlHpgpKVPkxicsZ1Q==.Render(#=zzeyKQQQpvUirV3a2DneaSPjVlNnv #=zgLT9OHk=, CancellationToken #=zMv6IMy0=)
at #=zepXMn3aOXQeGsBRvP55jJ$cWVANrsfMbCQ==.#=zZl25FXfgTxY$(#=z025FSXRaPSKzTVLLTpLUP$4= #=zOCpCAhUczVPnAE511A==, #=zzJKQrO2_JkadMqH_MPB9rx6XknqP[] #=zTrUZTFPEiGD0, #=zzeyKQQQpvUirV3a2DneaSPjVlNnv #=zgLT9OHk=, CancellationToken #=zEqeoIz0=)
at #=zCuETAWWVHwf8kYlsKKx7zulCAckO.Render(#=zzeyKQQQpvUirV3a2DneaSPjVlNnv #=zgLT9OHk=, CancellationToken #=zEqeoIz0=, #=zIH1bQDzVlZBVGEwqoUJJGcE=[] #=z5eiBLFk=, #=zdx8OitpyrXOgSNmhMFQByWg=[] #=zMmjcrAc=)
at #=zCuETAWWVHwf8kYlsKKx7zulCAckO.Render(#=zzeyKQQQpvUirV3a2DneaSPjVlNnv #=zgLT9OHk=, TimeSpan #=zBEHWQ0Q=, #=zxzNMWNI$pHHo_y2wAQaogY8=[] #=zDwl1kFk=)
at #=zu49guH3YXX6Fo4kaMZO30c8zSGyX.Render(#=zzeyKQQQpvUirV3a2DneaSPjVlNnv #=zgLT9OHk=, #=zvcYVrxc= #=zKIcLiRU=, TimeSpan #=zBEHWQ0Q=)
at #=zu49guH3YXX6Fo4kaMZO30c8zSGyX.Render(#=zzeyKQQQpvUirV3a2DneaSPjVlNnv #=zgLT9OHk=, #=zvcYVrxc= #=zKIcLiRU=)
at #=zd5KiagU$TAnvgbzDPxEB4x$cJD0o.#=zTNRvK7r7MOD1(Stream #=zoXOz2yS3ECC_, Document #=zYvD5hMHeEEwt, HtmlLoadOptions #=z35bYqiWebbIo, String #=zgW4WiFY59QIX)
at #=zd5KiagU$TAnvgbzDPxEB4x$cJD0o.#=zb425bcY=(Stream #=zoXOz2yS3ECC_, Document #=zYvD5hMHeEEwt, HtmlLoadOptions #=z35bYqiWebbIo, String #=zgW4WiFY59QIX)
at #=zd5KiagU$TAnvgbzDPxEB4x$cJD0o.#=zb425bcY=(Stream #=zoXOz2yS3ECC_, Document #=zYvD5hMHeEEwt, HtmlLoadOptions #=z35bYqiWebbIo)
at Aspose.Pdf.Document.#=zLvLiNJQ=(Stream #=zCv_6Bi0=, LoadOptions #=z7rDPLZI=)
at Aspose.Pdf.Document…ctor(Stream input, LoadOptions options)
at OSHD_Intranet.Classes.Common.Utilities.PdfHelper.InitializeAspose()
Please kindly support it. Thanks