Hello, I pulled the NuGet package PDFMigrate v1.5.1 which contains the following:
MigraDoc.DocumentObjectModel-gdi.dll v1.50.4589.0
MigraDoc.Rendering-gdi.dll v1.50.4589.0
PdfSharp.Charting-gdi.dll v1.50.4589.0
PdfSharp-gdi.dll v1.50.4589.0
I have implemented a solution using the above which functions under windows however when built under mono and run in a linux environment I get an exception
'EntryPointNotFoundException: GetDC'
at (wrapper managed-to-native) PdfSharp.Internal.NativeMethod:GetDC
at PdfSharp.Drawing.XFontSource.ReadFontBytesFromGdi
when i call the 'RenderDocument' method of my PdfDocumentRenderer.
I have been trying to develop a solution that works under windows and linux environments, i had originally attempted to load private fonts under mono but, having posted a question on the forum (
http://forum.pdfsharp.net/viewtopic.php?f=2&t=3730), understood that this was not supported on the PDFMigrate v1.5.1 release.
At that time i am sure i had some sort of report generating under mono using the default system font but i am starting to doubt this, i may just have had some code to create fonts but not render anything.
Looking at the implementation of PdfSharp.InternalNativeMethod GetDC in 'NativeMethods.cs' i can see that it is importing it from user32.dll which presumably mono will not have.
Code:
[DllImport("user32.dll")]
public static extern IntPtr GetDC(IntPtr hwnd);
Has anyone had any success generating a pdf using migradoc under mono with the PDFMigrate release?
Thanks for reading