Talk:Print
From MapbenderWiki
Contents |
[edit]
Mapbender PDF generation
[edit]
Dynamic PDF generation
- the current way of printing with mapbender
[edit]
PDF generation with templates
[edit]
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.
[edit]
Links
- FPDF Library
- FPDI Import existing PDF documents into FPDF
- mapbender_pdf-print_with_xml/xslt - Print workgroup
[edit]
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
[edit]
Implementation
- put fpdf/fpdi libs in /http/classes/fpdf
- discuss pdf template configuration
[edit]
Combine dynamic and template driven PDF generation?
[edit]
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.


