Enabling High-Quality Printing in Web Applications Tanu Hoque & Craig Williams
New Modern Print Service with ArcGIS Enterprise 10.6 Quality Improvements: Support for true color level transparency PDF produced with vector features with transparency or picture symbol etc. In Layouts: - Unicode support in legend item - Ghost (named Overlay X ) layers removed - Legend patches show with correct fill and outline - Legend patches don t get pixelated - Map scale is computed at the middle of the current map extent You ll want the ArcGIS Server 10.6 Printing and Script Tool Patch RESOLVED Sample incorrect outputs from 10.5.1 or older printing services
What s New? New capabilities: - Vector tile layers - Smart mapping - Vector renderer off raster layers
Client APIs To Work With New Features Requires custom apps using ArcGIS API for JavaScript 4.6+ Not supported in (as of today and Online December 2017 release): - ArcGIS Online map viewer - ArcGIS Enterprise portal map viewer - Web AppBuilder built into Enterprise portal 2016 - Web AppBuilder Developer Edition 2.6 (or upcoming update based on Online December release)
Print Services
High Quality Printing on the Web Primary Goals: - Create a printable document (PDF preferably) - Have that document printed to exact scale - Leverage ArcGIS Pro layouts - Support large format plots - Display ALL contents of my Web map - Services, graphics, feature layers, etc. - Be able to modify the map content during the process - High DPI We created a 3 tiered approach to meet these needs
High Quality Printing 3 Tiered Approach : Tier 1 Simple printing Out of the box Geoprocessing Service with ArcGIS Enterprise Small format Synchronous Token based secure services
High Quality Printing 3 Tiered Approach : Tier 2 Custom configuration Ability to supply your own templates Asynchronous if desired Large format
High Quality Printing 3 Tiered Approach : Tier 3 Advanced cases Supported via arcpy.mp Map & layer addition, replacement, etc.
Printing Service Overview Print services are powered by WebMaps - Consistent format produced by all the ArcGIS APIs - JSON based spec for sharing services, graphics, symbols etc. Note: The services in the WebMap must be accessible to the Print Service - Firewalls etc. JavaScript Apps Etc. WebMap Print Service (Export WebMap) PDF etc.
Printing Cached Services Raster tiles typically created at 96 DPI Dynamic layer support can be enabled for Map Services - Allows for printing at higher DPI than cached images - You must have Publisher or Admin privileges to update the service dynamiclayers = False (600 DPI) dynamiclayers = True (600 DPI)
ArcGIS Online Organization & ArcGIS Enterprise Register your own print service Print on-premises services behind a firewall
Demo Out of The Box Print Service
Custom Print Service With Your Own Layout Templates
Custom Configuration Publish the Export Web Map tool as your own service - Use your own layout templates - Branding logo, layout design, fonts etc. - Choose to make the service asynchronous if desired - This choice depends on the size of your prints and the length of time they ll take
Retrieving Layout Template Metadata New task with Printing Services to return metadata about available layout templates - It is an arcpy-based script tool. Tool in ArcGIS Pro Task in Service Directory Custom Text Elements showing up in WAB
Publishing Custom Print Service - Recap Layout templates Remove all existing layers - Except in the overview map or - For advanced vector printing (example in section 3) Updating existing templates will not need republishing - Unless you didn t register template folder to the data store
Demo Printing with custom templates
Advanced Print Service Using arcpy
Why arcpy? Advanced use cases: - Vector output (service swap) - Print popups - Multiple page output with - legal documents - reports - pictures - driving directions etc.
Custom Print Workflows: arcpy.mp New arcpy.mp method for converting Web Maps to maps in Pro projects ConvertWebMapToArcGISProject (webmap_json, {template_pagx}, {mapframe_name}, {notes_gdb})
Arcpy.mp Workflows Once a WebMap is converted to a map in the ArcGIS Pro project - Full capabilities of arcpy.mp on the map - Modify content - Add content - Export using custom options - etc. See the arcpy.mp help for examples
Client APIs
APIs for Printing Printing support in ArcGIS Web and Mobile APIs: JavaScript: Print Dijit ArcGIS Runtime SDK for Java: PrinterJob.NET SDK (Desktop, Store, and Phone APIs): Print Task Samples on developers.arcgis.com
Wait! You didn t actually print anything Printing services are about generating printable documents (PDF etc.) If you wish to send the output to a physical printer automatically - Use the arcpy.mp workflow - Local printers xcopy to local share on some printers - Cloud printing workflows (e.g. Google Cloud Print) - Driverless printing - Simple APIs that can be called from Python
Printing Service Recap Print services are powered by WebMaps - Consistent format produced by all the WebAPIs - JSON based spec for sharing services, graphics, symbols etc. You can use the out of the box tool, a custom configuration, or an arcpy.mp approach JavaScript Apps Etc. WebMap Print Service (Export WebMap) PDF etc.