Talk:Print

From MapbenderWiki

Jump to: navigation, search

Contents

Mapbender PDF generation

Dynamic PDF generation

  • the current way of printing with mapbender

PDF generation with templates

Summary

In addition to the current print PDF functionality, we want to enhance usability by using a pdf template mechanism provided by the FPDF/FPDI libraries. It will be possible to place certain elements, like the map, overview, scalebar, north arrow, etc. onto a user provided pdf template, allowing for e.g. sophisticated graphical pdf layouts.

Links

What do we need

conf file for
  • definition of available formats and paper sizes (depends on available templates)
  • defining which elements should be shown in the PDF (map, overview, scalebar, different texts etc.)
  • definition of size and position of all print elements
PDF templates
  • create some standard templates for all standard formats and paper sizes
create own templates
  • we should think about an easy way to create new templates for the users
integration of lib FPDF/FPDI into Mapbender
  • directory in mapbender/http/extensions
edit mod_printPDF_pdf.php
  • edit script, integrate FPDF/FPDI functionality, check which existing functionality can be used further more

Implementation

  • put fpdf/fpdi libs in /http/classes/fpdf
  • discuss pdf template configuration

Combine dynamic and template driven PDF generation?

Design

In a recent discussion with Christoph, he mentioned the use of patterns and in this case the factory pattern and decorator pattern. Maybe this approach cold be used to combine both ways. I've sketched a simple class structure, that may serve as a basis for some discussion.

Personal tools