Print map


Purpose
This sample demonstrates how to change the PageLayout control's Page properties and print the page to the system default printer.
 
The browse dialog allows you to search and select map documents, which are then validated and loaded into the PageLayout control using the CheckMxFile and LoadMxFile methods. When 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 page layout is sent to the printer using the Print method, the orientation of the printer's paper is aligned to that of the page's paper.

How to use

See How to use ArcGIS samples for help on running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Run the PrintMap application.
  2. Browse and select a map document to load into the PageLayout control.
  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.


Download the files for Java
pagelayoutbean/PrintMap.java Main class




Development licensing Deployment licensing
Engine Developer Kit Engine Runtime
ArcView
ArcEditor
ArcInfo