-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
306 lines (263 loc) · 11.5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>MapFish Print 3 Documentation - Overview</title>
<link rel="stylesheet" href="css/sphinx_rtd_theme.css" type="text/css" />
<link rel="stylesheet" href="css/readthedocs-doc-embed.css" type="text/css" />
<link rel="stylesheet" href="css/custom.css" type="text/css" />
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="index.html" class="icon icon-home"> MapFish Print 3</a>
</div>
<div
class="wy-menu wy-menu-vertical"
data-spy="affix"
role="navigation"
aria-label="main navigation"
>
<ul class="current">
<li class="toctree-l1 current">
<a class="reference internal current" href="index.html">Introduction</a>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="jasperreports.html"
>JasperReports</a
>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="api.html">Web API</a>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="attributes.html">Attributes</a>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="configuration.html"
>Configuration</a
>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="layers.html">Map Layers</a>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="processors.html">Processors</a>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="fileloaders.html">File-Loaders</a>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="outputformats.html"
>Output Formats</a
>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="styles.html">Styles</a>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="tableimages.html"
>Images in tables</a
>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="download.html">Download</a>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="docker.html">Docker</a>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="scaling.html">Horizontal scaling</a>
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">MapFish Print 3</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> »</li>
<li>Overview</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/mapfish/mapfish-print" class="fa fa-github">
mapfish/mapfish-print</a
>
</li>
</ul>
<hr />
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Overview</h1>
<div class="section"><p>
The purpose of Mapfish Print is to create reports that contain maps (and map related components) within
them.
</p>
<p>
The project is a Java-based servlet/library/application based on the mature
<a href="https://community.jaspersoft.com/project/jasperreports-library" target="_blank" rel="noopener"
>JasperReports Library</a
>.
</p>
<div class="admonition note examples">
<p class="first admonition-title">Getting started</p>
<p class="last">
A good way to get started with MapFish Print 3 is to follow the <strong>introduction workshop</strong>.
Download the workshop
<a target="_blank" href="https://mapfish.github.io/mapfish-print-workshop/mfp-workshop.zip" rel="noopener"
>here</a
>
(zip archive).
</p>
</div>
<p>Mapfish Print has the following distributions:</p>
<ul>
<li>
The most commonly used distribution is the <em>war</em> distribution where Mapfish Print is a servlet and
can be run in a servlet container like
<a href="https://tomcat.apache.org/" target="_blank" rel="noopener">Apache Tomcat</a>.
</li>
<li>
Mapfish Print is also distributed as a Java <em>jar</em> which allows Mapfish Print to be used like a
normal Java library, or embedded in an existing Java web application as an addition servlet.
</li>
<li>
The last distribution is a command-line application where the reports can be generated via command-line.
This is useful for debugging configurations and requests.
</li>
</ul>
<h2>Design Philosophy</h2>
<p>The (much simplified) architecture of Mapfish Print is as follows:</p>
<img class="architecture" src="images/Mapfish_Print_V3_Architecture.svg" />
<p>
This diagram illustrates how a client (web-client or Java application) communicates with the Mapfish Print
Server. In the case of a Java application the communication is directly with the Java Servlet Object and for
web-clients via HTTP requests. The protocol consists of several requests, only a few of which are shown in
the diagram. For the full list of requests see: <a href="api.html">Web Protocol</a>.
</p>
<p>The typical request sequence a client will make is as follows:</p>
<ul>
<li>
If the client is a generic client, the client will make a capabilities request in order to obtain
information about the required <a href="attributes.html">attributes</a> needed to be sent to the server.
</li>
<li>
Next the create request will be made and all the <a href="attributes.html">attributes</a> (the data
required in order to print the report) are sent to the server. The server will return a reference id of
the print job for obtaining the report and the status.
</li>
<li>
Once the create request returns, the client will poll the server asking about the status of the print.
</li>
<li>
Once the status request returns the completion response (and not an error) then the client will make the
GET report request.
</li>
</ul>
<p>
On the server side, once a create request is received the server will create a print job and send it to the
job manager, which is responsible for running the print job asynchronously (possibly on a completely
different server) and allowing the HTTP request to return a response to the user without waiting for the
print job to complete. As an aside, there is a <code>createAndGet</code> request that will wait until the
printing is done and directly return the report without having to poll to see if the print is done. This is
a convenience for client makers.
</p>
<p>
While creating the print job all of the <a href="attributes.html">attributes</a> are parsed from the JSON
and a job reference id is generated to uniquely identify the created job.
</p>
<p>
Once the print job is started, the <a href="attributes.html">attributes</a> are passed to the
<a href="processors.html">processors</a>. The processors work with the
<a href="attributes.html">attributes</a> in order to generate the maps, tables, legends, etc... that are
required by the <a href="outputformats.html">output format</a> (Jasper template).
</p>
<p>
Once the <a href="processors.html">processors</a> have all completed execution all of the values are passed
to the <a href="outputformats.html">output format</a> which uses that information to generate the report. In
theory an <a href="outputformats.html">output format</a> could be anything that generates a report. However
the current version uses the
<a href="https://community.jaspersoft.com/project/jasperreports-library">Jasper Reports Library</a> for its
outputs and several of the processors are Jasper Reports focuses. Because of this the documentation will
assume that the output format is always based on
<a href="https://community.jaspersoft.com/project/jasperreports-library">Jasper Reports</a>.
</p>
<p>
The <a href="outputformats.html">output format</a> will generate a report and store it in some way for later
retrieval. At this point the status request would return a response indicating that the print job has
completed.
</p>
</div>
</div>
</div>
<footer>
<hr />
<div role="contentinfo">
<p>
<a href="https://www.camptocamp.com/geospatial_solutions" target="_blank" rel="noopener"
>Camptocamp</a
>
<br />
<span class="commit">
Revision
<code
><a
href="https://github.com/mapfish/mapfish-print/commit/a2c9774eb1a2c92fcd85c2b91670e45fce89bc46"
target="_blank"
>a2c9774e</a
></code
>.
</span>
</p>
</div>
Theme based on a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">template</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script
type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"
integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
></script>
<script
type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/jquery-migrate/3.5.2/jquery-migrate.min.js"
integrity="sha512-BzvgYEoHXuphX+g7B/laemJGYFdrq4fTKEo+B3PurSxstMZtwu28FHkPKXu6dSBCzbUWqz/rMv755nUwhjQypw=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
></script>
<script
type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.13.7/underscore-min.js"
integrity="sha512-dvWGkLATSdw5qWb2qozZBRKJ80Omy2YN/aF3wTUVC5+D1eqbA+TjWpPpoj8vorK5xGLMa2ZqIeWCpDZP/+pQGQ=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
></script>
<script
type="text/javascript"
src="js/theme.js"
crossorigin="anonymous"
referrerpolicy="no-referrer"
></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>