How to print the graph on multiple pages

Questions & Answers

Summary

This article shows how to print the graph using a CanvasPrinter or a customized print method.

Description

The class CanvasPrinter offers a number of options to print the graph. By setting its hPages and vPages properties to values > 1 it's possible to print the graph on multiple pages.

Further customizations are possible by subclassing CanvasPrinter. Overriding the methods drawPageBackground() or drawPageForeground(), for example, allow to draw a background or additional information in the foreground, respectively.

More information can be found in the Developer's Guide

For further customizations or for using a custom printing framework it is possible to create a sprite from the graph. This sprite can be printed using the custom printing framework (or the Flex printing framework).

The yFiles FLEX CanvasComponent offers a method createSprite() that creates a sprite containing all objects currently drawn on the canvas.

Using a flash.printing.PrintJob to print the created sprite, you have full control over the printing process.

For further information about printing in Flex see

Categories this article belongs to:
yFiles FLEX > Input and Output > Printing
Applies to:
yFiles FLEX: 1.3, 1.4, 1.5, 1.6, 1.7, 1.8
Keywords:
print - printing