Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Flowchart export to pdf using pdfExporter does not export the grid lanes (Read 1534 times)
Dav
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 4
Joined: Aug 30th, 2013
Flowchart export to pdf using pdfExporter does not export the grid lanes
Nov 29th, 2013 at 11:45am
Print Post  
Hello,

I have a problem exporting to PDF a MindFusion.Diagramming.Diagram flowchart.

The grid lanes are not being shown. I use the follwing code to force the gridpen to be set, but with the pdf exporter does not create the grid lane.

I also create a wmf image for the same flowchart using the Mindfusion WmfExporter, and this work fine.

I don't know the reason why it is shown on the wmf image but not in the final pdf exported. I also read in an old post something like the cells has not to be wiht empty strings, but it didn't work.

Thanks.

Code
Select All
            var pdfExporter = new PdfExporter
                {
                    AutoScale = PdfExportOptions.Instance.PdfAutoScale,
                    InvisibleItems = PdfExportOptions.Instance.InvisibleItems,
                    Margins = PdfExportOptions.Instance.Margins,
                    PageOrientation = PdfExportOptions.Instance.PageOrientation,
                    PageSize = PdfExportOptions.Instance.PageSize,
                    Scale = PdfExportOptions.Instance.PdfScale,
                };


            MindFusion.Drawing.Pen gridlinePenPDF =
                new MindFusion.Drawing.Pen(
                    new MindFusion.Drawing.HatchBrush(HatchStyle.Percent50, Color.Gray, Color.Transparent), 0);

            for (int i = 0; i < flowChart.LaneGrid.RowCount; i++)
            {
                for (int j = 0; j < flowChart.LaneGrid.ColumnCount; j++)
                {
                    flowChart.LaneGrid[j, i].Style.LeftBorderPen =
                        flowChart.LaneGrid[j, i].Style.TopBorderPen = gridlinePenPDF;
                }
            }

pdfExporter.Export(FlowChart, fileName); 

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Flowchart export to pdf using pdfExporter does not export the grid lanes
Reply #1 - Nov 29th, 2013 at 12:20pm
Print Post  
Hi,

I suppose PdfExporter doesn't support pens created from HatchBrush objects. Try exporting a copy of the diagram where such pens are replaced with solid-color ones.

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