Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic PDF Export Sample Error (Read 1738 times)
FranzS
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 1
Joined: Jun 30th, 2010
PDF Export Sample Error
Jun 30th, 2010 at 11:28pm
Print Post  
Hi,

I'm evaluating your FlowChart.net component.
First of all.. great component, great documentation, easy to learn.. I will buy it anyway..

I just wanted to inform you that there is a problem in your sample 'PDF Export'. When I click the 'Export to PDF' button I get a System.NullReferenceException in MindFusion.Pdf.dll error. In my testprogram I just created some simple shapes, linked them and the export to pdf worked ok except of little problems: if a text of a link was 'sdfsfs' the text in the PDF file was just 'sdfsf', or if it was 'sdfsfs xx' I just saw 'sdfsfs'.. so the link text is somtimes truncated.

I tested your Export to PDF sample on a Win7 64bit PC with .net 2.0 (VS 2005 professional) and 3.5 (VS 2008 Express). Below you see the error detail I got running your sample program.

Thanks,
Franz

System.NullReferenceException wurde nicht behandelt.
Message="Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt."
Source="MindFusion.Pdf"
StackTrace:

bei MindFusion.Pdf.PdfImage.GetContent()

bei MindFusion.Pdf.PdfObject.Save(PDFWriter writer)

bei MindFusion.Pdf.PdfPage.Save(PDFWriter writer)

bei MindFusion.Pdf.PdfDocument.Save(String fileName)

bei MindFusion.Pdf.PdfGraphics.SaveContent()

bei MindFusion.Pdf.PdfGraphics.Dispose()

bei MindFusion.Diagramming.Export.PdfExporter.Export(Diagram diagram, String filePath)

bei MindFusion.Diagramming.WinForms.Samples.VB.PdfExporter.MainForm.button1_Click(Ob
ject sender, EventArgs e) in C:\Program Files (x86)\MindFusion\MindFusion.Diagramming for WinForms Trial\VS2005 (.NET 2.0)\Samples\VB.NET\PdfExporter\MainForm.vb:Zeile 163.

bei System.Windows.Forms.Control.OnClick(EventArgs e)

bei System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)

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

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

bei System.Windows.Forms.ButtonBase.WndProc(Message& m)

bei System.Windows.Forms.Button.WndProc(Message& m)

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

bei System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

bei System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)

bei System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNat
iveMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)

bei System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)

bei System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)

bei MindFusion.Diagramming.WinForms.Samples.VB.PdfExporter.MainForm.Main() in C:\Program Files (x86)\MindFusion\MindFusion.Diagramming for WinForms Trial\VS2005 (.NET 2.0)\Samples\VB.NET\PdfExporter\MainForm.vb:Zeile 18.

bei System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)

bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()

bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

bei System.Threading.ThreadHelper.ThreadStart()
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: PDF Export Sample Error
Reply #1 - Jul 1st, 2010 at 8:42am
Print Post  
Hi,

Thank you for your feedback - we have reproduced this on a 64bit Windows 7 test system of ours. It seems the problem happens because TextureBrush converts its image to the Format32bppPArgb pixel format, for which our PDF library does not have any support. We are not sure yet if this happens because of the OS or the video driver there (ours is ATI). We'll try to add support for that format to the next version anyway.

For now you can work around this by setting the Image property instead of using a TextureBrush, i.e. replace

node5.Brush = new TextureBrush(pbTile.Image);

with

node5.Image = pbTile.Image;
node5.ImageAlign = ImageAlign.Stretch;

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint