Dear All,

I am using mapfish to print WMS layers from Geoserver 2.4.0. While printing
WMS layers, Error appears in PDF file for some WMS layers.

The Error is:

*java.io.IOException: The byte array is not a recognized imageformat.*


If I am using the format* "application/pdf"*, everything is printed
correctly but quality is very poor.


I am using below code to get print:

     http://localhost:8080/geoserver/pdf/print.pdf?spec={
    "layout":"A3 portrait",
    "srs":"EPSG:404000",
    "units":"m",
    "dpi":300,
    "outputFilename": "ggg",
    "layers":[
    {
        "baseURL":"http://localhost:8080/geoserver/cite/wms";,
        "opacity":1,
        "singleTile":false,
        "type":"WMS",
        "layers":["Oxford_Map"],
        "format":"image/png",
        "styles":[],
        "overview":true
    },
    {
        "baseURL":"http://localhost:8080/geoserver/cite/wms";,
        "opacity":1,
        "singleTile":true,
        "customParams":{"CQL_FILTER": "User_id = 234"},
        "type":"WMS",
        "layers":["ODC_Graphics_Data"],
        "format":"image/png",
        "styles":[],
        "overview":false
    },
    {
        "baseURL":"http://localhost:8080/geoserver/cite/wms";,
        "opacity":1,
        "singleTile":true,
"customParams":{"TRANSPARENT":true,"buffer": 0},
        "type":"WMS",
        "layers":["Plymouth_Buildings"],
        "format":"image/png",
        "styles":[],
        "overview":false
    },
    {
        "baseURL":"http://localhost:8080/geoserver/cite/wms";,
        "opacity":1,
        "singleTile":true,
"customParams":{"TRANSPARENT":true,"buffer": 0.1},
        "type":"WMS",
        "layers":["Plymouth_Hard_Surface_Block_Paving"],
        "format":"image/png",
        "styles":[],
        "overview":false
    },
    {
        "baseURL":"http://localhost:8080/geoserver/cite/wms";,
        "opacity":1,
        "singleTile":true,
"customParams":{"TRANSPARENT":true,"buffer": 0},
        "type":"WMS",
        "layers":["Plymouth_QUERIES"],
        "format":"image/png",
        "styles":[],
        "overview":false
    },
    {
        "baseURL":"http://localhost:8080/geoserver/cite/wms";,
        "opacity":1,
        "singleTile":true,
"customParams":{"TRANSPARENT":true,"buffer": 0.1},
        "type":"WMS",
        "layers":["Plymouth_Street_Lights"],
        "format":"image/png",
        "styles":[],
        "overview":false
    }
    ],
    "pages":[
    {
        "center":[248744.93342196,55350.945],
        "mapTitle":"",
        "company":"testuser2_portrait",
        "comment":"",
        "scale":439,
        "rotation":0
    }
    ] }

And My Yaml Configuration is:


#===========================================================================
    A3 portrait:

#===========================================================================
    mainPage:
      pageSize: A3
      landscape: false
      rotation: true
      backgroundPdf: 'D:\Oxford\ODC_Internal\PDF\${company}.pdf'
      header:
        height: 1
        items:
          - !text
            font: Helvetica
            fontSize: 15
            align: center
            text: '${mapTitle}'
      items:
       - !columns
          absoluteX: 87
          absoluteY: 1147
          width: 735
          config:
            #borderWidth: 0.3
            cells:
              - padding: 2
          items:
            - !map
              width: 500
              height: 600
              #width: 733
              #height: 1124

Kindly help me to fix this issue. Thanks in Advance.
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to