Hi all,
Here is my problem in more detail:
I have a map which I want to print in high resolution. In order to be in high
resolution the map can't be fit in one page, it must be printed in more than
one page.
According to the documentations:
http://docs.geoserver.org/latest/en/user/extensions/printing/configuration.html
<http://docs.geoserver.org/latest/en/user/extensions/printing/configuration.html>
"If the items that are in the main section are too big, more pages are
generated."
Here is my config.yaml:
#===========================================================================
# allowed DPIs
#===========================================================================
dpis: [75, 150, 300, 1000]
#===========================================================================
# the allowed scales
#===========================================================================
scales:
- 25000
- 50000
- 100000
- 200000
- 500000
- 1000000
- 2000000
- 4000000
- 8000000
- 16000000
- 160000000
- 1600000000
#===========================================================================
# format
#===========================================================================
formats:
- *
#===========================================================================
# the list of allowed hosts
#===========================================================================
hosts:
- !localMatch
dummy: true
#===========================================================================
# the output file name
#===========================================================================
outputFilename: 'map-${dd_MM_yyyy-hh_mm_ss}'
#===========================================================================
# The list of layouts
#===========================================================================
layouts:
A3:
mainPage:
pageSize: A3
items:
- !map
spacingAfter: 30
width: 440
height: 483
Legal:
mainPage:
pageSize: LEGAL
items:
- !map
spacingAfter: 30
width: 640
height: 430
##########################################################################################3
And here is my post request's body (the specs):
{
"units":"degrees",
"srs":"EPSG:4326",
"layout":"Legal",
"dpi":1000,
"layers":[
{
"baseURL":"http://localhost:6256/geoserver/wms
<http://localhost:6256/geoserver/wms>",
"opacity":1,
"singleTile":false,
"type":"WMS",
"layers":[
"tst:geometry_table"
],
"format":"image/jpeg",
"styles":[
""
],
"customParams":{
}
}
],
"pages":[
{
"bbox":[25.9937515258789, 31.9969902038574, 27.2562484741211,
33.0051727294922],
"rotation":0,
"mapTitle":"A custom title",
"comment":"A custom comment"
}
]
}
##########################################################################################
This request result in printing the map in only one page with a high scale
(1:1000,000).
My question is how to print this map with a lower scale (e.g. 1:100,000), so
that it fits in more than one page?
I've tried to encrease the map size in the config.yaml file to be more than the
page size, but results in the following exception:
Error while generating PDF:
com.itextpdf.text.DocumentException: com.itextpdf.text.DocumentException:
Infinite table loop; row content is larger than the page (for instance because
you didn't scale an image).
at com.itextpdf.text.pdf.PdfDocument.add(PdfDocument.java:786)
at com.itextpdf.text.Document.add(Document.java:278)
at org.mapfish.print.config.layout.Page$1.add(Page.java:76)
at org.mapfish.print.config.layout.MapBlock.render(MapBlock.java:81)
at org.mapfish.print.config.layout.Page.render(Page.java:73)
at org.mapfish.print.config.layout.MainPage.render(MainPage.java:63)
at org.mapfish.print.config.layout.Layout.render(Layout.java:59)
at
org.mapfish.print.output.AbstractOutputFormat.doPrint(AbstractOutputFormat.java:30)
at org.mapfish.print.output.PdfOutputFactory.print(PdfOutputFactory.java:58)
What is my problem?
Thanks,
Fawzy
--
Securely sent with Tutanota. Claim your encrypted mailbox today!
https://tutanota.com <https://tutanota.com>
5. Aug 2018 06:28 by br...@frogmouth.net <mailto:br...@frogmouth.net>:
>
> I’m not at all familiar with this, but how have you defined the pages part of
> the {SPEC} you’re using?
>
>
>
> More generally, what have you already tried, what happened, and what were you
> expecting to happen instead?
>
>
>
> Brad
>
>
>
> From:> > faw...@tutamail.com <mailto:faw...@tutamail.com>> <>
> faw...@tutamail.com <mailto:faw...@tutamail.com>> >
> Sent:> Saturday, 4 August 2018 9:27 PM
> To:> Geoserver Users <> geoserver-users@lists.sourceforge.net
> <mailto:geoserver-users@lists.sourceforge.net>> >
> Subject:> [Geoserver-users] Geoserver Mapfish: how to print in multiple
> pages?
>
>
>
> Hi all,
>
> I need to print a large map with a high resolution.
>
> I wonder is it possible to print such a map in more than one page? and how?
>
> I've tested the Mapfish Printing Demo that comes with Geoserver admin page,
> but it only print in one page, even if I enlarge the map extent and
> resolution.
>
>
>
> Regards,
>
> Fawzy
>
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
Please make sure you read the following two resources before posting to this
list:
- Earning your support instead of buying it, but Ian Turton:
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:
http://geoserver.org/comm/userlist-guidelines.html
If you want to request a feature or an improvement, also see this:
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users