Reply To: PDF export results in an Exception

Hi!

I am getting the following exception raised when attempting to export to PDF:

************** Exception Text **************

System.NullReferenceException: Object reference not set to an instance of an object.

at SoftwareIdeasModeler.Drawing.PdfGraphics.DrawString(String s, Font font, Brush brush, RectangleF layoutRectangle)

at SoftwareIdeasModeler.Visualisation.DiagramDrawer.DrawString(String text, Font font, Brush brush, RectangleF rect)

at SoftwareIdeasModeler.DiagramItems.Special.DiagramDescription.Draw(DiagramDrawer drawer, DrawingParameters param)

at SoftwareIdeasModeler.Visualisation.DiagramDrawer.Draw(DiagramLayer layer, ConcreteDiagramItem item)

at SoftwareIdeasModeler.Visualisation.DiagramDrawer.Draw(DiagramLayer layer, Rectangle clipArea)

at SoftwareIdeasModeler.Visualisation.DiagramDrawer.Draw(Diagram diagram, Rectangle drawBounds)

at SoftwareIdeasModeler.Visualisation.DiagramDrawer.Draw(Diagram diagram)

at SoftwareIdeasModeler.Exporters.PdfDiagramExporter.ExportToFile(String fileName)

at SoftwareIdeasModeler.ExportUtils.ExportToPdf(String fileName, Diagram diagram)

at SoftwareIdeasModeler.MainForm.exportPDFToolStripMenuItem_Click(Object sender, EventArgs e)

at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)

at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)

at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)

at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)

at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)

at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)

at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)

at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)

at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

at System.Windows.Forms.Control.WndProc(Message& m)

at System.Windows.Forms.ScrollableControl.WndProc(Message& m)

at System.Windows.Forms.ToolStrip.WndProc(Message& m)

at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Any ideas on how to get around this would be a big help.

Rob G 24 August 2010 16:53:50

New Comment

Comment
You can use these formatting tags: [b]bold[/b] [i]italic[/i] [u]underline[/u] [url]www.example.com[/url] [code]some code[/code] [quote]quoted text[/quote] [list]one list item per line[/list]