Printing using GoXam

hi im using Goxam for diagramming, right now i can print a diagram in
one Page and what i need is that if my Diagram is very large, it should
be split in more than one Page, and i dont know how to do this.

XAML:
 <go:Diagram x:Name="myDiagram1" Grid.Column="2" Padding="200" 
        VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch"  
        NodeTemplateDictionary="{StaticResource NodeTemplateDictionary}"  
        LinkTemplateDictionary="{StaticResource LinkTemplateDictionary}" 
        Canvas.Left="8" Canvas.Top="384" Opacity="1" FontFamily="Arial" 
        AllowScroll="True" ClipboardPasted="myDiagram1_ClipboardPasted" 
        GridSnapEnabled="True" GridSnapCellSize="25,25" GridVisible="False" 
        HorizontalAlignment="Center" VerticalAlignment="Center">
      <go:Diagram.DraggingTool>
         <local:CustomDraggingTool DragOverSnapArea="DiagramAndNodes" 
                DropOntoEnabled="True" />
      </go:Diagram.DraggingTool>
  <go:Diagram.PrintManager>
         <go:PrintManager Scale="NaN" ForegroundTemplate="{StaticResource 
             PrintBorderTemplate}" PageOptions="FullGridBackground"  Margin="30 70 30 
             70" />
  </go:Diagram.PrintManager>
</go:Diagram>

C#:
 private void ButtonPrint_Click(object sender, RoutedEventArgs e)
 {
    myDiagram1.PrintManager.Parts = myDiagram1.SelectedParts; // User can select what 
                                                                 they want to print!
    activeDiagram.CommandHandler.Print();
 }

The easy answer is to not set the PrintManager.Scale. Setting it to NaN tells it to automatically scale to fit the diagram bounds within one page.

thanx for ur Answer, but i would like to know if there is another way, becuase i set the Scale=“1”, it split my diagram into more Pages but the Printing didnt display the rest of my Diagram, there was some missing Nodes.

What GoXam version and platform are you using?

Could you check that the Diagram.Panel.DiagramBounds covers the area of the Nodes that were not printed?

hi im using Windows 7 Enterprise
GoWPF 1.3.5.4
i set the scale to 0.6 and myDiagram1.PrintManager.Bounds = myDiagram1.Panel.DiagramBounds;
it work, it print 6 Pages and my model is just displayed in two Pages and the rest ist blank.
how could i solve this problem

I don’t think we have encountered this problem with GoWPF before.

Could you characterize the nodes and links that are missing?
Is there anything common about where they are or what they look like?

Are there are trace warning or error messages?

And just to be sure, I should ask: you haven’t set or bound Part.Printable to false?

If you try printing to a different printer, or to the XPS Document Writer, does it print everything?

If you try printing in one of the sample apps that supports printing, does it work?

Is there any way you can help me reproduce the problem?

for this Diagram i set the Scale to 0.8
why it print blank Document (3, 6)

Are there supposed to be nodes on pages 3 and 6?
In other words, in your diagram can you scroll to the right and see nodes to the right of those shown printed on pages 2 and 5?

When I try printing with a scale of 0.8 using the Planogram sample, which lets me set the printing scale, everything prints just fine, all the way to the right (my example was four pages wide).

Of course not all printed pages are guaranteed to have any content printed on them, because it always prints a rectangular grid of pages, and some of those pages might be blank.

However, assuming there aren’t any missing nodes but just some unexpected blank printed pages, that might be because the padding on the diagram is large, causing the Diagram.Panel.DiagramBounds to be a lot larger than the area occupied by the nodes and links.

on Page 3 and 6 it is not supposed to be nodes. Thanx for ur help.
I would be gratefull if there is a code for the Planogram sample!

The GoWpfDemo includes source code for all of the samples.

thanx

As I said earlier, your problem is probably caused by setting the Diagram.Padding to be a large value (200). You can try setting it to a small value. Even without changing it, you can see its effects by not setting the PrintManager.PageOptions = “Full…”.

i set Padding=“50” and it still print blank (3,6)

If you don’t set PrintManager.PageOptions, you’ll get a better impression of how much of the document (i.e. the Diagram.Panel.DiagramBounds) crosses over onto pages 3 and 6.

And as I said before, the smaller the value of Diagram.Padding, the less empty space is reserved along the margins, both when printing and in the interactive Diagram.