Hot answers tagged

5 votes
Accepted

Mapfish/Geoserver printing: layer problems

Ok, it was kind of obvious (as the stack trace said (it seems I was kind of blind at that moment)): It is a security issue: As soon as you add the url of the host of the respective layer to your ...
user avatar
3 votes

Examples of config.yaml for printing

I don't know any printing module demo with several different config.yaml to choose from. I would recommend to start by the examples provided in the mapfish print GitHub repository.
user avatar
  • 4,615
3 votes
Accepted

Print Mapbox XYZ layer using Mapfish/Geoserver

I had constructed my URL incorrectly, the base URL can't contain the z/x/y and the access token needs to be added as a custom param, for example: { type: "XYZ", baseURL: 'https://api.mapbox....
user avatar
  • 133
3 votes

Is it possible to send an OpenLayers map to QGIS for printing?

QGIS is a desktop program, you could create a project file with the WFS/WMS layers then modify the xml of the QGIS project file to load up in the extent that the Open Layers map is in. Export the user ...
user avatar
  • 2,086
3 votes

Print Maps - OpenLayers, GeoServer, GeoExt, MapFish

Expanding on my comment: Mapfish Print versus GeoServer Print module The MapFish Print Module is basically the exact same thing as the GeoServer printing module. In fact, the later is built from the ...
user avatar
  • 6,591
2 votes
Accepted

What is the path for font in mapfish print module for windows in config.yaml?

I've got it working using: fonts: - 'C:\Geoserver_data_dir\printing\arial.ttf'
user avatar
  • 188
2 votes

Geoserver printing (2.8) fails: InvalidValueException

I can't recreate your issue though I'm using GeoServer 2.7.2 which might matter. If I install GeoServer and add the matching print extension, I can then do: curl -H "Content-Type: application/json" ...
user avatar
  • 75.1k
2 votes
Accepted

How to print only a selection of the map using MapFish Printing Module?

"Normally" the bbox should be: left, bottom, right, top west, south, east, north minX, minY, maxX, maxY so I would try: bbox: [-1050091.8944356, 4675576.582525099, -990623.88643799, 4733515....
user avatar
  • 6,350
2 votes

Leaflet Client Side rendering

Those are like three questions. I will answer the part about client-side rendering of large files. Large-scale rendering is difficult in Leaflet, partially due to loading large files in the browser. ...
user avatar
  • 448
1 vote

GeoServer 2.11.2 print with MapFish

According to the manual the config file goes in GEOSERVER_DATA_DIR/printing/config.yaml
user avatar
  • 75.1k
1 vote
Accepted

Mapfish 3 variables in scalebar processor

You enumerate all possible attributes in your config.yaml, eventually defining default values. In your *.json you can assign values to those attributes. MapFish Print will render your *.jrxml report ...
user avatar
  • 4,615
1 vote

Mapfish 3 merge datasource with multiple maps

I ended up using only one report, with 2 createmap processors config.yaml templates: report: !template reportTemplate: report.jrxml outputFilename: report-${yyyyMMdd_hhmmss} attributes:...
user avatar
1 vote

Missing 'Spec' Parameter using print.pdf on GeoServer Print Module

To get this working in Tomcat 9 I had to send the post data as ContentType = "application/x-www-form-urlencoded"; and encoded the post json in JavaScript as "spec=" + encodeUri(jsonObject) or ...
user avatar
  • 11
1 vote
Accepted

Failure in printing OSM as a basemap through GeoServer Mapfish Plugin

The problem is with the projection that you are using. As far as I know, OSM map is in ESPG:900913. Using any projection other than EPSG:900913 might cause some issues while generating the map. Also, ...
user avatar
1 vote

Failure in printing OSM as a basemap through GeoServer Mapfish Plugin

The fact that the URL is returning a 404 is the problem. This is probably to do with the -1 in the tile index, the most likely cause of this is a mismatch in the tile origin or the projection.
user avatar
  • 75.1k
1 vote

Allowing all hosts on map in Mapfish Print 2.1.2?

You could try something like this: - !ipMatch host: 127.0.0.1 # Allow to all hosts mask: 0.0.0.0
user avatar
1 vote

Geoserver MapFish print : wrong scale and scalebar on my printed map

I'm answering my question, I've fixed it setting geodetic parameter to true. pages: [{ center: center, scale: scale, dpi: 190, geodetic: true, rotation: 0 }]
user avatar
  • 137
1 vote
Accepted

How to print a WMTS layer using MapFish v2 (from GeoNetwork)

After some time with the debugger and the mapfish code base I have managed to print a WMTS baselayer using the REST protocol. First I had to modify components/common/map/print/PrintMapService.js to ...
user avatar
  • 75.1k
1 vote

Mapfish Print Plugin v3 - WMTS Service

Use EPSG:3857 projection instead of EPSG:900913. The WMTS GetCapabilities response doesn't advertise that it supports EPSG:900913 instead it advertises: <ows:SupportedCRS>urn:ogc:def:crs:EPSG:...
user avatar
  • 111
1 vote

GeoServer Printing Extension and MapBox's new API

I solved this by using the XYZ layer type. This can take the optional path_format which I configured like this: path_format = '${z}/${x}/${y}' and that builds the proper URL.
user avatar
  • 13.1k
1 vote

Geoserver Mapfish printing

I got the solution, the problem was Chrome, the output url was dying without any pdf due to XMLHttpRequest but on firefox it works well.
user avatar
  • 133
1 vote
Accepted

Openlayers Mapfish Fails

I found that the issue was that my "GET" requests exceeded the maximum string length. I had to switch to using a "POST" request which then threw an error due to violating the cross origin rule. The ...
user avatar
1 vote

GeoServer with printing plugin, scale too low

I got answer. As in Mapfish docs, "The geodetic parameter can be set to true so the scale of geodetic layers can correctly be calculated. Certain projections (Google and Latlong for example) are ...
user avatar
1 vote

Mapfish Print v3 - Blank map

Ok, the problem was that I was requesting the wrong layer. As stated in the question, for some reason Mapfish has problems loading the layer by its name so I had to find the layer by ID. To do this ...
user avatar
1 vote

send SPECS to mapFish service using POST method

To POST, you need to call http://{print url}/pdf/create.json and post the json content and you will receive the response like: { getURL: "http://{print url}/pdf/6013561557039431559.pdf" } from ...
user avatar
1 vote

Mapfish Print Linux Problem

Do you have ImageMagick installed? http://www.mapfish.org/doc/print/installation.html#with-image-output-line At the moment to have robust image (png, gif, etc...) output options the image magick ...
user avatar
1 vote

MapFish installation "setuptools failed with error code 1"

I think you were using an archived installation process for mapfish. The following links should provide everything you need to get mapfish up and running. https://www.liquidweb.com/kb/how-to-install-...
user avatar
  • 454
1 vote

Geoserver PrintingProvider crushes after font color change I do to config.yaml

You are adding the correct variables as I have tried adding fontColor and changing font in my config.yaml (snippet below) and it works ok. - !text marginTop: 10 text: '${copyrightText}' ...
user avatar
1 vote

How to change Geoserver Mapfish print option from pdf to gif

please add formats: [pdf, png, gif] to your config.yaml of your printing. place it somewhere like dpis: [75, 150, 300, 600] formats: [pdf, png, gif] hower after you will enable the parameter, ...
user avatar
1 vote

How can I add image (e.g. North Arrow) in mapfish layout print with geoserver?

in config.yaml enable rotation: rotation: true copy arrow image to config dir (beside config.yaml) and add element: - !image width: 12 url: 'file://${configDir}/...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible