Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently added the print function to my GeoExt web application, using

<script type="text/javascript"src="http://localhost:8080/geoserver/pdf/info.json?var=printCapabilities"></script>

to define the printCapabilities variable,

        var printProvider = new{
            method: "GET", 
            url: "localhost/geoserver/pdf", 
            capabilities: printCapabilities

for the print provider and within the mapPanel

bbar: ["->", {
                text: "Print...",
                handler: function() { 
                    var printDialog = new Ext.Window({
                            items: [new GeoExt.PrintMapPanel({
                                sourceMap: mapPanel,
                                printProvider: printProvider,
                                    listeners: {
                                    "loadcapabilities": function() {
                                    var printPage = new{
                                        printProvider: printProvider,
                                        customParams: {
                                            mapTitle: "LVR WebGIS",
                                            comment: "created with GeoExt"
                              , true);
                                        printProvider.print(mapPanel, printPage);

                         bbar: [{
                                text: "Create PDF",
                                handler: function() {

to add the function to my mapPanel. Regarding this, I have two issues to be solved:

1.) the printPage popping up does not contain anything but the button saying "Create PDF". There should be a preview of the map to print, right?

2.) when some WFS vector features are displayed in the map, the print function does not work properly anymore. It opens a new tab in my browser but does not create the PDF. Instead, the new tab is left about:blank.

What am I doing wrong here? Is the information I provided enough for you guys to help me solve the problem? Thanks a lot for your help!

share|improve this question
Did you get anywhere with this? We are having a similar problem. – user7231 Apr 30 '12 at 11:39

Shouldn't the print provider set up refer to localhost:8080 instead of localhost/ ? if they really are on different ports then you probably need a proxy to handle the same origin requirements.

share|improve this answer
Well, it seem as this would help in one way: the new tab opening is not blank but is leading to this terribly long URL: http://localhost:8080/geoserver/pdf/print.pdf?spec=%7B%22units%22%3A%22degrees%‌​22%2C%22srs%22%3A%22EPSG%3A4326%22%2C%22layout%22%3A%22A4%22%2C%22dpi%22%3A380%2C‌​‌​DOP_JPG%3F%22%2C%22opacity%22%3A1%2C%22singleTile%22%3Afalse%2C%22type%22%3A%22WM‌​S and so on, it basically lists each feature in the map with it´s parameters. Something loads but stops after a while, not creating any output. – philippe Oct 26 '11 at 9:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.