Home User Manual Discussion Forum Search

Printing Patterns

Patterns for Printing.

WPF
In WPF, you do not draw objects to the printer, but instead add objects to a FixedDocument object and pass it to the printer as XPS (not GDI).  The objects that you add are the exact same kinds of UIElements that you would add to a Window for display on the screen, and you arrange them using the exact same layout containers.  You are responsible for intelligently laying out each element on the appropriate page.

The WPF printing pattern still needs some enhancements.  It doesn't show looping for multiple pages, it doesn't handle the printer selections within OD, and it doesn't include grid printing.  But it's good enough in its present form for simple printing jobs.

WPF uses 96 units per inch instead of the 100 units per inch that is used in GDI.

 

Windows.Forms
There are basically two methods that are involved in Windows.Forms printing.  This is typical of the first method:

And this is typical of the second method:

 

 

Open Dental Software 1-503-363-5432