Print Page Layout

Created:19/10/2001
Description:

This sample demonstrates changing the PageLayoutControl's page properties and printing the page to the system default printer. The Microsoft Common Dialog Control (Comdlg32.ocx) allows users to search and select map documents, which are validated and loaded into the PageLayoutControl using the CheckMxFile and LoadMxFile methods. Whenever the FormID, Orientation or PrinterToPageMapping properties of the Page are changed the number of pages to be printed is updated using the PrinterPageCount property. Before the PageLayout is sent to the printer using the Print method, the orienataion of the Printer's paper is aligned to that of the Page's paper.



How to use:
  1. Either run the PrintPageLayout.exe or open the PrintPageLayout.vbp and run from within the project.
  2. Browse and select a Mx document to load into the PageLayoutControl.
  3. Change the page size, orientation and printer to page mapping properties.
  4. Before printing the page layout, specify the page range to be printed, and whether there is to be any overlap between pages.

Application:
Page Layout Control

Minimum ArcGIS Version Required: 8.2

Difficulty: Beginner


Visual Basic
File Description
PrintPageLayout.frm VB form file for the PrintPageLayout project.
PrintPageLayout.frx VB Binary file.
PrintPageLayout.vbp VB Project file.


Key CoClasses: PageLayoutControl
Key Interfaces: IPrinter
Key Members: CheckMxFile, LoadMxFile, MousePointer, MxPath, Page, Printer, PrinterPageCount, PrintPageLayout, ZoomToWholePage