Splitting Diagram in more than one Part

hi im using Goxam for diagramming. for Large-Diagram (about 100 nodes), i should
split my Diagram in two or four Parts, and then draw them on two or four pages(using PDFSharp). can anyone tell me if there is a good link or tutorial for splitting diagrams.

Well, I would not call 100 nodes a large diagram, but I would expect it to take multiple “pages”. Perhaps you are just asking about how to “print” in a fashion that other utilities such as PDFSharp could use.

Is this for WPF or Silverlight?

Unfortunately I do not know anything about PDFSharp, so it is hard for me to suggest anything that would allow it to be used. Maybe there is a way to make use of the PrintManager to do what you want, since it has to do the hard work to set things up for printing.

this is for WPF

Hi i would like to split my Diagram in four Parts, so i defined 4 equal Rectangle, but in
bounds3 and bounds4 there still some missing Nodes. can anyone help!

//b = (X, Y, Width, Height).
// Original Diagram
Rect b = activeDiagram.Panel.DiagramBounds; // b = (-370, -190, 3099, 2450).

Rect bounds1 = new Rect(b.X, b.Y, w/2, h/2); //top left corner
Rect bounds2 = new Rect(b.X, b.Y + h/2, w/2, h/2); //bottom left corner
Rect bounds3 = new Rect(b.X + w/2, b.Y, w/2, h/2); //top right corner 
Rect bounds4 = new Rect(b.X + w/2, b.Y + h/2, w/2, h/2); //bottom right corner

Hi. It’s hard for us to help when you still haven’t told us how you are using PDFSharp to render your diagram.
First, is there a reason you aren’t using PDFSharp to render the whole diagram all at once? Does PDFSharp not support large FrameworkElements across multiple pages? Is this why you are talking about four different rectangles?

Does it work if you change the scale so that the whole diagram fits on one page?

It seems to me that if you are doing your own pagination, you want the size of each rectangle to be the size that will fit properly in a page, not just half the DiagramBounds in each direction.

How are you giving PDFSharp what it is that you want to render? Are you calling DiagramPanel.FindPartsIn with SearchInclusion.Intersects? If you are, you’ll need to reverse the order of the Parts that you get back, in order to maintain the rendering Z-order.

Or are you calling DiagramPanel.MakeBitmap? This should also work, but the rendering will be inferior.

Or are you using a PrintManager and using DocumentPaginator.GetPage? I haven’t tried this myself, but I think you could get this approach to work.

PDFSharp support large FrameworkElements across multiple pages, what im try to do ist that i split my Diagram in 4 Parts and every Part will be converted to PDF.
my Diagram without Splitting fit on one Page but the Print quality are not good. im Using

          Rect b = activeDiagram.Panel.DiagramBounds;
            double w = b.Width;
            double h = b.Height;
          double sw = 1.0;
          double sh = 1.0;
          double s = 1.0;
          if (w > 1600)
              sw = 1600 / w;
          if (h > 3450)
              sh = Math.Min(sh, 3450 / h);
          w = 2480;
          h = 3508;
          if (sw <= sh)
              s = sw;
              s = sh;
          s = s / 1.5;
          var bmp = activeDiagram.Panel.MakeBitmap(new System.Windows.Size(w, h), 300, new  
                            System.Windows.Point(b.X, b.Y), s, convertBitmap)

If everything fits on one page, why are you trying to split the diagram into four pages?

It should work to use DiagramPanel.MakeBitmap, at the expense of the resolution. Are you saying that the bitmaps are wrong somehow? If so, how are they wrong?

If PDFSharp is able to render arbitrarily sized FrameworkElements, why aren’t you using that ability? But if you do want to do this, you’ll first need to call FindPartsIn for the whole DiagramPanel.DiagramBounds area.

no they are not wrong but as i say for large Diagrams the Print quality is not good, cause of that i try to split large diagrams in 4 Parts