Developers Knowledge Base

Learn how to manipulate, modify, and tune your GeoMedia WebMap, Geospatial Portal and Consumer portal instances.
Showing results for 
Search instead for 
Do you mean 

Custom Snapshot Page for Printing

by Technical Evangelist on ‎04-12-2016 07:43 AM - edited on ‎04-07-2017 07:55 AM by Technical Evangelist (4,777 Views)

Geospatial Portal Printing Workflow

  • Portal performs local printing on the server using one of two engines
    • Internet Explorer
    • PhantomJS
  • Server-Side printing is performed using a „Snapshot Page” that is opened in the server-side printing engine
  • After the snapshot page is fully loaded, the printing engine captures a bitmap
  • EP05 introduces customization of the snapshot page allowing developer to load additional scripts
  • Local printout may be then piped to the printing service for further processing

Custom snapshot page

  • With EP05 it is possible to implement custom snapshot page that generates image used for the printout
  • Custom snapshot page may use API.js
  • Custom snapshot page may inject custom script tags
  • For example custom script tags may handle dynamic predicate based styles



Custom snapshot page implementation 




Custom snapshot page

  • Custom snapshot page inherits from SnapshotPage and allows to override LoadScripts method
  • SDK EP05 contains example implementation

PhantomJS printing configuration



<printing tileSize="2000" mapSizeLimit="5000" timeout="00:02" defaultService="FirstExternal" precisionGeographic="7" precisionProjected="0" printingEngine="phantomJS" phantomJSProgramLocation="c:\intergraph\Geospatial Portal\Program\PhantomJS\phantomjs.exe" />

Custom snapshot page registration in web.config



<!-- Custom snapshot page to be used for printing. It is possible to add custom scripts. See MySnapshotPage.cs and js/PrintingScripts.js for reference -->
<add key="SnapshotPage" value="MySnapshotPage.WebClient.ashx" />

Predicate based style






on ‎02-12-2018 07:00 AM

i see - i don't think that will help me - right now i have a binding paramter like Title and Created by defined in my xaml file where i can paste in the table I want displayed on map sheet (xaml text for table generated by pushing a button on query form) and it works but would like to be ble to skip this step.