This demo demonstrate the use of the GeoExtPrintForm widget that connects to a MapFishPrint service to send print requests to produce PDF documents. Only visible and supported layers are printable.
Simply click on the left menu labeled "Print" to open the form.
In this demo, the legend option is set, so the PDF also has a legend block included in it. Only WMS layers have their icons included in the legend. The MapFishPrint service configuration file (.yaml) must be accordingly setup with the 'legends' block. Read MapFishPrint 'legends' documentation to know more about this.
In this demo, a resource has the mapGrid option set, which includes a "Include Grid?" checkbox that toggles the visibility of the resource WMS layer when checked. The layer was made using the MapServer GRID object.
In this demo, an OverviewMap widget is present. Therefore, the GeoExtPrintForm has automatically linked itself to it in order to include the layer defined as the overview map to the print request sent. It will be used as the overview map in the generated PDF. The MapFishPrint service configuration file (.yaml) must be accordingly setup with a 'map' block using the overviewMap property. Read MapFishPrint 'map' documentation to know more about this.
See also the config.xml file used by this demo.