BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//pretalx//talks.staging.osgeo.org//foss4g-europe-2025//talk//JRTHP
 X
BEGIN:VTIMEZONE
TZID:CET
BEGIN:STANDARD
DTSTART:20001029T040000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
TZNAME:CET
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20000326T030000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
TZNAME:CEST
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
UID:pretalx-foss4g-europe-2025-JRTHPX@talks.staging.osgeo.org
DTSTART;TZID=CET:20250718T143000
DTEND;TZID=CET:20250718T150000
DESCRIPTION:#### Summary\nIn the context of a project for Swisstopo\, the F
 ederal Office of Topography of Switzerland\, we analyzed the current techn
 ological landscape for generating PDF files for print from vector tile-bas
 ed maps in online map services. One of our main goals was to identify pote
 ntial technology stacks supporting full backend rendering\, full frontend 
 rendering\, or hybrid approaches. While testing various options\, we devel
 oped a universal print backend based on Headless Chrome\, Puppeteer and No
 de\, which corresponds to a full backend rendering approach and ultimately
  became our main focus. We will present our findings about the various opt
 ions we have identified and elaborate in more detail on the developed prin
 t backend by presenting technical details as well as test results regardin
 g performance\, stability and quality.\n\n#### Description\nThe demand for
  generating PDF files (e.g.\, for print) from online map services remains 
 strong. Given the opportunities offered by vector tile-based maps and thei
 r resulting widespread adoption\, particularly Mapbox Vector Tiles\, provi
 ding this functionality in the context of web applications presents techni
 cal challenges that reveal shortcomings of existing solutions (e.g.\, mapf
 ish print) and call for new approaches.\\\nBy analyzing and testing well-e
 stablished technologies\, we identified several issues leading to unsatisf
 actory map renderings and PDF outputs. Some flaws are subtle\, such as tex
 t cut-offs at tile seams\, while others result in entirely unusable output
 s\, such as difficulties handling transparent layers.\nTo address these sh
 ortcomings\, we developed an alternative approach by delegating both map r
 endering and PDF generation to a Headless Chrome instance controlled by Pu
 ppeteer\, running inside a dedicated Node.js Docker container. This soluti
 on offers significant flexibility in choosing the rendering engine (e.g.\,
  MapLibre GL JS or OpenLayers) and defining the print frame (a simple HTML
  page with a map canvas for displaying raw maps is sufficient but can be e
 xtended with custom elements as required). \\\nFurthermore\, by explicitly
  adding GPU support to the container\, which is not available by default\,
  we achieved good performance in map rendering and PDF generation while en
 suring the same rendering quality as in the online map display.\n\n\n#### 
 Key Points\n\nThe primary factors motivating our choice of this setup incl
 uded:\n- Identical map display as online with MapLibre GL (WYSIWYG – Wha
 t You See Is What You Get)\n- Stability of the server even under heavy loa
 d\n- Scalability on AWS server\n- Maximum flexibility for layout design\, 
 defined directly in HTML\n\nOptimizations crucial for performance:\n- GPU 
 support\n- Caching\n\nComparative analysis of:\n- Conventional services (M
 apFish Print)\n- TileServer GL\n- Frontend-based solutions (InkMap)
DTSTAMP:20260527T112412Z
LOCATION:SA02
SUMMARY:PDF Map Generation as Headless Chrome Service - Dominik Frey
URL:https://talks.staging.osgeo.org/foss4g-europe-2025/talk/JRTHPX/
END:VEVENT
END:VCALENDAR
