Hello,
Alright, we never print your reports directly, so that shouldn't be the issue. We always export to PDF using these settings:
Code: Select all
private static readonly StiPdfExportSettings _exportSettings = new()
{
AllowEditable = StiPdfAllowEditable.Yes,
PdfComplianceMode = StiPdfComplianceMode.A1,
EmbeddedFonts = true,
ImageQuality = 1f,
ImageResolution = 600
};
The only StiOption I can see being set is StiOptions.Engine.Image.AbsolutePathOfImages being set to a specific folder. The failure seems to be happening before trying to render the report, so I'm not sure any of that will be helpful. Based on the exception it looks to be something to do with constructing a font or font family:
Code: Select all
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.SafeNativeMethods.Gdip.<>c.<.cctor>b__2_0(String _, Assembly _, Nullable`1 _)
at System.Runtime.InteropServices.NativeLibrary.LoadLibraryCallbackStub(String libraryName, Assembly assembly, Boolean hasDllImportSearchPathFlags, UInt32 dllImportSearchPathFlags)
at System.Drawing.SafeNativeMethods.Gdip.<GdiplusStartup>g____PInvoke|32_0(IntPtr* __token_native, StartupInputEx* __input_native, StartupOutput* __output_native)
at System.Drawing.SafeNativeMethods.Gdip.GdiplusStartup(IntPtr& token, StartupInputEx& input, StartupOutput& output)
at System.Drawing.SafeNativeMethods.Gdip..cctor()
--- End of inner exception stack trace ---
at System.Drawing.SafeNativeMethods.Gdip.GdipCreateFontFamilyFromName(String name, HandleRef fontCollection, IntPtr& FontFamily)
at System.Drawing.FontFamily.CreateFontFamily(String name, FontCollection fontCollection)
at System.Drawing.FontFamily..ctor(String name, Boolean createDefaultOnFail)
at System.Drawing.Font.Initialize(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
at System.Drawing.Font..ctor(String familyName, Single emSize, FontStyle style)
I'm not sure why it would be doing that if all of the System.Drawing dependencies have been removed. Hopefully this helps narrow down the source of the problem.