[Geoserver-users] How to print legend image?

Hi.

I trying to print legend image using print module. In my config.yaml i have:

  • !legends
    backgroundColor: #FFFFFF
    horizontalAlignment: left
    inline: false
    defaultScale: 0.5
    iconMaxWidth: 0
    iconMaxHeight: 0
    iconPadding: 3 0 0 0
    textMaxWidth: 300
    textMaxHeight: 0
    textPadding: 0 10 0 10
    columnMaxWidth: 0
    classIndentation: 20
    layerSpaceBefore: 10
    layerSpace: 25
    classSpace: 10
    layerFont: Arial
    layerFontSize: 14
    classFont: Arial
    classFontSize: 12
    fontEncoding: Cp1252

But when i tried print a style with multiple rules image was too smal to read it. Like as in atached example. What can i do with this problem?

mapfish-print-geoserver.pdf (54.1 KB)

Hi Макс,

depending on the mapfish print-lib version you are using you need to use a different property in you !legends block:

maxIconHeight: 0 for print-lib 1.2

iconMaxHeight:0 for print-lib 2.x

I see you are using the second version, but you are probably still using print-lib version 1.2 (this is the default on Geoserver 2.5.x and previous versions, the 2.1 version will instead be used on 2.6.x).

Mauro

Mauro

···

2014-07-22 17:48 GMT+02:00 Макс Кливер <dh0m0ch@…84…>:

Hi.

I trying to print legend image using print module. In my config.yaml i have:

  • !legends
    backgroundColor: #FFFFFF
    horizontalAlignment: left
    inline: false
    defaultScale: 0.5
    iconMaxWidth: 0
    iconMaxHeight: 0
    iconPadding: 3 0 0 0
    textMaxWidth: 300
    textMaxHeight: 0
    textPadding: 0 10 0 10
    columnMaxWidth: 0
    classIndentation: 20
    layerSpaceBefore: 10
    layerSpace: 25
    classSpace: 10
    layerFont: Arial
    layerFontSize: 14
    classFont: Arial
    classFontSize: 12
    fontEncoding: Cp1252

But when i tried print a style with multiple rules image was too smal to read it. Like as in atached example. What can i do with this problem?


Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world’s largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hi Mauro,

I use Geoserver 2.3 and 2.5, so maxIconHeight: 0 for print-lib 1.2 help for me.

Thanks you!

Max.

···

On Tue, Jul 22, 2014 at 10:09 PM, Mauro Bartolomeoli <maurobartolomeoli@anonymised.com> wrote:

Hi Макс,

depending on the mapfish print-lib version you are using you need to use a different property in you !legends block:

maxIconHeight: 0 for print-lib 1.2

iconMaxHeight:0 for print-lib 2.x

I see you are using the second version, but you are probably still using print-lib version 1.2 (this is the default on Geoserver 2.5.x and previous versions, the 2.1 version will instead be used on 2.6.x).

Mauro

Mauro

2014-07-22 17:48 GMT+02:00 Макс Кливер <dh0m0ch@anonymised.com>:

Hi.

I trying to print legend image using print module. In my config.yaml i have:

  • !legends
    backgroundColor: #FFFFFF
    horizontalAlignment: left
    inline: false
    defaultScale: 0.5
    iconMaxWidth: 0
    iconMaxHeight: 0
    iconPadding: 3 0 0 0
    textMaxWidth: 300
    textMaxHeight: 0
    textPadding: 0 10 0 10
    columnMaxWidth: 0
    classIndentation: 20
    layerSpaceBefore: 10
    layerSpace: 25
    classSpace: 10
    layerFont: Arial
    layerFontSize: 14
    classFont: Arial
    classFontSize: 12
    fontEncoding: Cp1252

But when i tried print a style with multiple rules image was too smal to read it. Like as in atached example. What can i do with this problem?


Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world’s largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users