When I try and print from the Map Viewer in GeoNetwork 3.0.3, the print
fails and I get the following error message from Google developer tools:
POST http://vmagsdev:8080/geonetwork/pdf/create.json?url=..%2F..%2Fpdf 500
(Internal Server Error)
Error while generating PDF:
Unknown method: /create.json
I have read previous post suggesting changes to the print-config.yaml file.
I changed the IP address. See my print-config.yaml file below:
#===========================================================================
# allowed DPIs
#===========================================================================
dpis:
- 600
- 254
- 190
- 127
#===========================================================================
# the allowed scales
#===========================================================================
scales:
- 5000
- 10000
- 25000
- 50000
- 100000
- 200000
- 500000
- 1000000
- 2000000
- 4000000
- 40000000
- 100000000
- 140000000
formats:
- pdf
- png
- jpeg
#===========================================================================
# the list of allowed hosts
#===========================================================================
hosts:
- !localMatch
dummy: true
- !ipMatch
host: vmagsdev:8080
# Allow to all hosts
mask: 255.255.0.0
layouts:
#===========================================================================
A4 portrait:
mainPage:
rotation: true
pageSize: A4
backgroundPdf: '${configDir}/template.pdf'
header:
height: 1
items:
- !columns
absoluteX: 10
absoluteY: 832
width: 575
items:
- !text
font: Helvetica
fontSize: 24
text: '${title}'
- !map
spacingAfter: 10
width: 575
height: 680
absoluteX:10
absoluteY:790
- !columns
absoluteX: 15
absoluteY: 130
width: 160
items:
- !scalebar
align: left
maxSize: 160
type: 'bar sub'
intervals: 5
- !columns
absoluteX: 565
absoluteY: 145
width: 30
items:
- !image
maxWidth: 30
maxHeight: 30
url: 'file://${configDir}/Arrow_North_CFCF.svg'
rotation: '${rotation}'
- !columns
absoluteX: 10
absoluteY: 90
width: 575
items:
- !text
font: Helvetica
fontSize: 11
text: '${comment}'
- !columns
absoluteX: 10
absoluteY: 19
width: 575
items:
- !text
text: '- ${now yyyy/MM/dd HH:mm} -'
align: right
fontEncoding: Cp1252
fontSize: 8
lastPage:
items:
- !columns
condition: enableLegends
absoluteX: 51
absoluteY: 808
width: 511
items:
- !legends
inline: false
defaultScale: 0.5
maxHeight: 400
maxWidth: 500
iconMaxHeight: 0
iconMaxWidth: 0
horizontalAlignment: left
columnMargin: 10
classIndentation: 3
classSpace: 5
backgroundColor: white
layerFontSize: 9
#===========================================================================
A4 paysage:
mainPage:
rotation: false
pageSize: LEGAL
landscape: true
backgroundPdf: '${configDir}/template-thumbnail.pdf'
items:
- !map
spacingAfter: 0
width: 1008
height: 612
absoluteX: 0
absoluteY: 612
- !columns
absoluteX: 10
absoluteY: 600
width: 575
items:
- !text
font: Helvetica
fontSize: 24
text: '${title}'
- !columns
absoluteX: 15
absoluteY: 30
width: 160
items:
- !scalebar
align: left
maxSize: 160
type: 'bar sub'
intervals: 5
- !columns
absoluteX: 965
absoluteY: 45
width: 30
items:
- !image
maxWidth: 30
maxHeight: 30
url: 'file://${configDir}/Arrow_North_CFCF.svg'
rotation: '${rotation}'
lastPage:
landscape: true
items:
- !columns
condition: enableLegends
absoluteX: 21
absoluteY: 588
width: 801
items:
- !legends
inline: false
defaultScale: 0.5
maxHeight: 400
maxWidth: 800
iconMaxHeight: 0
iconMaxWidth: 0
horizontalAlignment: left
columnMargin: 10
classIndentation: 3
classSpace: 5
backgroundColor: white
layerFontSize: 9
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Print-error-in-Geonetwork-Map-Viewer-tp5246636.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.