Sorry for the delayed response, I was busy somewhere else.
The same error occurs without the separate task.
It throws an exception.(see below)
System.Collections.Generic.KeyNotFoundException was unhandled
HResult=-2146232969
Message=The given key was not present in the dictionary.
Source=PresentationCore
StackTrace:
at MS.Internal.FontCache.FontFaceLayoutInfo.IntMap.System.Collections.Generic.IDictionary<System.Int32,System.UInt16>.get_Item(Int32 i)
at Northwoods.Go.Pdf.GoPdfWriter.CidWids(List`1 CharSet, GlyphTypeface gt, UInt16& DW, Double& bl, Double& bb, Double& br, Double& bt, UInt16[]& glyphset)
at Northwoods.Go.Pdf.GoPdfWriter.finalizeFonts()
at Northwoods.Go.Pdf.GoPdfWriter.Generate(Stream stream)
at Northwoods.Go.Pdf.GoPdfWriter.Generate(String path)
at SE.ControlDatabaseMigrationTool.DiagramUserControl.Diagram.b__3b() in c:\Projects\BaileyMigration\ControlDatabaseMigrationTool\src\ControlDatabaseMigrationTool\DiagramUserControl\Diagram.cs:line 773
at SE.ControlDatabaseMigrationTool.DiagramUserControl.Diagram.ExportPDF() in c:\Projects\BaileyMigration\ControlDatabaseMigrationTool\src\ControlDatabaseMigrationTool\DiagramUserControl\Diagram.cs:line 789
at SE.ControlDatabaseMigrationTool.DiagramUserControl.Diagram.Export() in c:\Projects\BaileyMigration\ControlDatabaseMigrationTool\src\ControlDatabaseMigrationTool\DiagramUserControl\Diagram.cs:line 253
at SE.ControlDatabaseMigrationTool.UI.VisualizationUserControl.btn_ExportPDF_ItemClick(Object sender, ItemClickEventArgs e) in c:\Projects\BaileyMigration\ControlDatabaseMigrationTool\src\ControlDatabaseMigrationTool\ControlDatabaseMigrationTool_UI\VisualizationUserControl.cs:line 243
at DevExpress.XtraBars.BarItem.OnClick(BarItemLink link)
at DevExpress.XtraBars.BarBaseButtonItem.OnClick(BarItemLink link)
at DevExpress.XtraBars.BarButtonItem.OnClick(BarItemLink link)
at DevExpress.XtraBars.BarItemLink.OnLinkClick()
at DevExpress.XtraBars.BarButtonItemLink.OnLinkClick()
at DevExpress.XtraBars.BarItemLink.OnLinkAction(BarLinkAction action, Object actionArgs)
at DevExpress.XtraBars.BarButtonItemLink.OnLinkAction(BarLinkAction action, Object actionArgs)
at DevExpress.XtraBars.BarItemLink.OnLinkActionCore(BarLinkAction action, Object actionArgs)
at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.ClickLink(BarItemLink link)
at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.UnPressLink(BarItemLink link)
at DevExpress.XtraBars.Controls.CustomLinksControl.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at DevExpress.XtraBars.Controls.DockedBarControl.WndProc(Message& msg)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run()
at SE.ControlDatabaseMigrationTool.UI.Program.Main() in c:\Projects\BaileyMigration\ControlDatabaseMigrationTool\src\ControlDatabaseMigrationTool\ControlDatabaseMigrationTool_UI\Program.cs:line 25
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
We are not AFAIK specifying font families.
However we are using skins to set the general UI look & feel.
I don’t know if that would affect the fonts used by (or made available to) your library.
The strange thing is that most diagrams export without fail when they are generated exactly the same way as the few that fail.