Select to view content in your preferred language

pchPrintWidget SOE An error occurs during print

3643
14
02-02-2012 06:08 AM
LuciHawkins
Frequent Contributor
Hi Tom,

I randomly receive this error in a little grey box with an ok button:     Error during print!  An error occurs during print   I click on OK and it just returns me to the web app.

When I look in the arcgisoutput folder the mxd and the pdf are there and they have all of the elements.  Any ideas?

I am using the PCHarcgisSOE.jar dated 2/1/2012, the pchprintwidget dated 1/31/2012, Flexviewer 2.5, AGS Api 2.5 dated 11/30/2011, ArcGIS Server 10, ArcGIS Desktop 10 Service Pack 3, and Java version 1.6.0_16


On a side note, where do you change the selection for the type of North Arrow used in the map?

This is an awesome tool and I cant wait for our staff to be able to use it!

Thank you!

Luci
Tags (2)
0 Kudos
14 Replies
EricVenden
Frequent Contributor
I believe I am experiencing the same issue.  Can you get the print to work at all?  Tom had added some functionality that I had requested and it appears something may have broken.  I rolled back to a previous version I was using and do not have the problem now.

Eric V

Hi Tom,

I randomly receive this error in a little grey box with an ok button:     Error during print!  An error occurs during print   I click on OK and it just returns me to the web app.

When I look in the arcgisoutput folder the mxd and the pdf are there and they have all of the elements.  Any ideas?

I am using the PCHarcgisSOE.jar dated 2/1/2012, the pchprintwidget dated 1/31/2012, Flexviewer 2.5, AGS Api 2.5 dated 11/30/2011, ArcGIS Server 10, ArcGIS Desktop 10 Service Pack 3, and Java version 1.6.0_16


On a side note, where do you change the selection for the type of North Arrow used in the map?

This is an awesome tool and I cant wait for our staff to be able to use it!

Thank you!

Luci
0 Kudos
LuciHawkins
Frequent Contributor
I have it working, but sometimes get the error.  I am still testing it, but it seems to happen when I have a layer or layers with a transparency that I set in the flexviewer config.xml file.   Sometimes the legend shows the symbology properly and sometimes it looks odd.  I definitely get the error every time I have more items in my legend than can be displayed on the layout.  I have not figured out how to set the legend not to exceed the size of the layout.

Luci
0 Kudos
EricVenden
Frequent Contributor
OK..sounds like a bit different error than I am getting.  I have configured the printout legend to leave out just about ALL legend entries...

Eric V

I have it working, but sometimes get the error.  I am still testing it, but it seems to happen when I have a layer or layers with a transparency that I set in the flexviewer config.xml file.   Sometimes the legend shows the symbology properly and sometimes it looks odd.  I definitely get the error every time I have more items in my legend than can be displayed on the layout.  I have not figured out how to set the legend not to exceed the size of the layout.

Luci
0 Kudos
LuciHawkins
Frequent Contributor
I tested it some more and it happens with or without layers that have transparency.  It almost seems like a memory problem to me now .  Our webserver has 16 gig ram and 100 gig free on the hard drive. 

I can print a simple background map with 7 layers at 100, 200, or 300 dpi - but when I test it at 600 dpi it either fails and I receive the error or it prints and labels are missing.  If it fails, when I look at the mxd in arcgisoutput, it is fine but PDF or JPG has labels missing.  Most of our map services use some kind of label classes and or scale ranges.

Thanks,

Luci
0 Kudos
LuciHawkins
Frequent Contributor
The attachments show the PDF and the MXD of the simple background map printed to 600 dpi PDF.  You can see the differences in the labels shown in the MXD versus what errored and did not show up in the PDF.

Thanks,

Luci
0 Kudos
TomSchuller
Frequent Contributor
Luci,

I randomly receive this error in a little grey box with an ok button: Error during print! An error occurs during print I click on OK and it just returns me to the web app.
When I look in the arcgisoutput folder the mxd and the pdf are there and they have all of the elements. Any ideas?



Could you post the DEBUG serverlog? I will check it.
  https://bitbucket.org/tomlux/pchprintsoe/wiki/ErrorReporting

If the files are written to the output directory, it should be just a small bug 🙂

Tom
0 Kudos
LuciHawkins
Frequent Contributor
Hi Tom,

Attached are the last line out of the FB 4.6 console and the last part of the log pertaining to the print job.

Thank you!

Luci
0 Kudos
LuciHawkins
Frequent Contributor
I downloaded the new version of pchPrintWidget yesterday afternoon.  I noticed it was not able to bind some objects in my console this morning:

Thanks, Luci

computePrintExtent.mapPU: 6000000 x 8610000 cm
computePrintExtent.mapSizePU: 6000000 x 8610000 cm
computePrintExtent.mapSizeCalc: 196850.3937007874 x 282480.3149606299 esriFeet
computePrintExtent.mapPU: 1200000 x 1722000 cm
computePrintExtent.mapSizePU: 1200000 x 1722000 cm
computePrintExtent.mapSizeCalc: 39370.07874015748 x 56496.06299212598 esriFeet
computePrintExtent.mapPU: 960000 x 1377600 cm
computePrintExtent.mapSizePU: 960000 x 1377600 cm
computePrintExtent.mapSizeCalc: 31496.062992125982 x 45196.850393700784 esriFeet
computePrintExtent.mapPU: 480000 x 688800 cm
computePrintExtent.mapSizePU: 480000 x 688800 cm
computePrintExtent.mapSizeCalc: 15748.031496062991 x 22598.425196850392 esriFeet
computePrintExtent.mapPU: 240000 x 344400 cm
computePrintExtent.mapSizePU: 240000 x 344400 cm
computePrintExtent.mapSizeCalc: 7874.015748031496 x 11299.212598425196 esriFeet
computePrintExtent.mapPU: 160000 x 229600 cm
computePrintExtent.mapSizePU: 160000 x 229600 cm
computePrintExtent.mapSizeCalc: 5249.343832020997 x 7532.808398950131 esriFeet
computePrintExtent.mapPU: 96000 x 137760 cm
computePrintExtent.mapSizePU: 96000 x 137760 cm
computePrintExtent.mapSizeCalc: 3149.6062992125985 x 4519.685039370079 esriFeet
computePrintExtent.mapPU: 48000 x 68880 cm
computePrintExtent.mapSizePU: 48000 x 68880 cm
computePrintExtent.mapSizeCalc: 1574.8031496062993 x 2259.8425196850394 esriFeet
warning: unable to bind to property 'selected' on class 'Object' (class is not an IEventDispatcher)
warning: unable to bind to property 'popupClass' on class 'Object' (class is not an IEventDispatcher)
warning: unable to bind to property 'visible' on class 'Object' (class is not an IEventDispatcher)
warning: unable to bind to property 'label' on class 'Object' (class is not an IEventDispatcher)
warning: unable to bind to property 'editable' on class 'Object' (class is not an IEventDispatcher)
warning: unable to bind to property 'selected' on class 'Object' (class is not an IEventDispatcher)
warning: unable to bind to property 'popupClass' on class 'Object' (class is not an IEventDispatcher)
warning: unable to bind to property 'visible' on class 'Object' (class is not an IEventDispatcher)
warning: unable to bind to property 'label' on class 'Object' (class is not an IEventDispatcher)
warning: unable to bind to property 'editable' on class 'Object' (class is not an IEventDispatcher)
warning: unable to bind to property 'selected' on class 'Object' (class is not an IEventDispatcher)
warning: unable to bind to property 'popupClass' on class 'Object' (class is not an IEventDispatcher)
warning: unable to bind to property 'visible' on class 'Object' (class is not an IEventDispatcher)
warning: unable to bind to property 'label' on class 'Object' (class is not an IEventDispatcher)
warning: unable to bind to property 'editable' on class 'Object' (class is not an IEventDispatcher)
warning: unable to bind to property 'selected' on class 'Object' (class is not an IEventDispatcher)
warning: unable to bind to property 'popupClass' on class 'Object' (class is not an IEventDispatcher)
warning: unable to bind to property 'visible' on class 'Object' (class is not an IEventDispatcher)
warning: unable to bind to property 'label' on class 'Object' (class is not an IEventDispatcher)
warning: unable to bind to property 'editable' on class 'Object' (class is not an IEventDispatcher)
warning: unable to bind to property 'selected' on class 'Object' (class is not an IEventDispatcher)
warning: unable to bind to property 'popupClass' on class 'Object' (class is not an IEventDispatcher)
warning: unable to bind to property 'visible' on class 'Object' (class is not an IEventDispatcher)
warning: unable to bind to property 'label' on class 'Object' (class is not an IEventDispatcher)
warning: unable to bind to property 'editable' on class 'Object' (class is not an IEventDispatcher)
http://fwb-gissrv/arcgis/rest/services/Maps/layout/MapServer/exts/PCHPrintSOE/printLayout?mapExtent={"xmin":1303081.032888712,"ymin":518702.7574471363,"xmax":1304655.836038318,"ymax":520962.5999668213,"spatialReference":{"wkid":2238}}&printOutput={"width":21,"height":29.7,"mapRotation":0,"resolution":600,"format":"png","borderWidth":[0.5,0.5,0.5,0.5],"exportSettings":null,"pageUnits":8,"toRemoveLayoutElements":["*"],"referenceScale":0}&mapElements=[]&layoutElements=[{"anchor":"bottomright","height":null,"width":null,"xOffset":0,"visible":true,"name":"myScaleBar","yOffset":1,"geometry":{"x":20.5,"y":1.5},"symbol":{"type":"pchNorthArrow","size":48}},{"anchor":"topmid","height":null,"width":null,"xOffset":0,"visible":true,"name":"myScaleBar","yOffset":0,"geometry":{"x":10.5,"y":29.2},"symbol":{"type":"pchTextElement","text":"Title","textSymbol":{"yoffset":0,"font":{"size":24,"weight":"normal","family":"Arial","decoration":"none","style":"normal"},"backgroundColor":{"alpha":255,"blue":255,"green":255,"red":255},"angle":0,"color":{"alpha":255,"blue":0,"green":0,"red":0},"text":null,"type":"agsJsonSymbol","xoffset":0,"borderLineColor":null}}},{"anchor":"bottomright","height":"","width":"","xOffset":-0.25,"visible":true,"name":"myScaleBar","yOffset":0.25,"geometry":{"x":20.25,"y":0.75},"symbol":{"type":"pchScaleBar","barHeight":5}},{"anchor":"topleft","height":"","width":"","xOffset":0,"visible":true,"name":"myScaleBar","yOffset":0,"geometry":{"x":0.5,"y":29.2},"symbol":{"style":0,"backgroundColor":{"alpha":255,"blue":255,"green":255,"red":255},"numberFormat":{"roundingValue":3,"roundingOption":0},"separator":":","pageUnits":9,"mapUnitLabel":"","type":"pchScaleText","pageUnitLabel":"","mapUnits":8}},{"anchor":"bottomleft","height":"","width":"","xOffset":0,"visible":true,"name":"myScaleBar","yOffset":0,"geometry":{"x":0.5,"y":0.5},"symbol":{"showHeadings":false,"legendBackground":{"color":{"alpha":255,"blue":255,"green":255,"red":255},"style":"esriSFSSolid","type":"esriSFS","outline":null},"legendTitle":"Legend","legendColumns":1,"exceptionLayerNamesStr":"Addresses,City Addresses,County Addresses,Road Names,Building Footprints,Hydrography Boundary,Hydrography Water Body,Greater FWB,Bridges,February 2010 Aerial,WReferenceBoundary,SSReferenceBoundary,Roads,Minor Roads,Major Roads,Parcels,Subdivision_Names_GC,Subdivision_Names_IND,Subdivision_Names_NE,Subdivision_Names_NW,Subdivision_Names_SE,Subdivision_Names_SW,Lots,Lot_No_GC,Lot_No_IND,Lot_No_NE,Lot_No_NW,Lot_No_SE,Lot_No_SW,RW_Size_GC,RW_Size_IND,RW_Size_NE,RW_Size_NW,RW_Size_SE,RW_Size_SW,Block_No_GC,Block_No_IND,Block_No_NE,Block_No_NW,Block_No_SE,Block_No_SW,EASEMENT_Deed,EASEMENT_Disclaimer,EASEMENT_Ordinance,EASEMENT_Plat,EASEMENT_RCovenants","includeAllLayers":true,"exceptionLayerNames":["Addresses","City Addresses","County Addresses","Road Names","Building Footprints","Hydrography Boundary","Hydrography Water Body","Greater FWB","Bridges","February 2010 Aerial","WReferenceBoundary","SSReferenceBoundary","Roads","Minor Roads","Major Roads","Parcels","Subdivision_Names_GC","Subdivision_Names_IND","Subdivision_Names_NE","Subdivision_Names_NW","Subdivision_Names_SE","Subdivision_Names_SW","Lots","Lot_No_GC","Lot_No_IND","Lot_No_NE","Lot_No_NW","Lot_No_SE","Lot_No_SW","RW_Size_GC","RW_Size_IND","RW_Size_NE","RW_Size_NW","RW_Size_SE","RW_Size_SW","Block_No_GC","Block_No_IND","Block_No_NE","Block_No_NW","Block_No_SE","Block_No_SW","EASEMENT_Deed","EASEMENT_Disclaimer","EASEMENT_Ordinance","EASEMENT_Plat","EASEMENT_RCovenants"],"type":"pchLegend","showLabels":true,"showLayerNames":true}}]&mapServices=[{"visibleIds":"0","definitionExpression":null,"url":"http://fwb-gissrv/ArcGIS/rest/services/Maps/GreaterFWB/MapServer","alpha":1,"type":"AGS","name":"Map","token":""},{"visibleIds":"0","definitionExpression":null,"url":"http://fwb-gissrv/ArcGIS/rest/services/Maps/Parcels/MapServer","alpha":1,"type":"AGS","name":"Parcels","token":""},{"visibleIds":"0,1,2","definitionExpression":null,"url":"http://fwb-gissrv/ArcGIS/rest/services/Maps/Hydrography/MapServer","alpha":1,"type":"AGS","name":"Hydrography","token":""},{"visibleIds":"0","definitionExpression":null,"url":"http://fwb-gissrv/ArcGIS/rest/services/Maps/BFP/MapServer","alpha":1,"type":"AGS","name":"Building Footprints","token":""},{"visibleIds":"0","definitionExpression":null,"url":"http://fwb-gissrv/ArcGIS/rest/services/Maps/Neighborhoods/MapServer","alpha":0.59765625,"type":"AGS","name":"Neighborhoods","token":""},{"visibleIds":"0","definitionExpression":null,"url":"http://fwb-gissrv/ArcGIS/rest/services/Maps/RoadNames/MapServer","alpha":1,"type":"AGS","name":"Road Names","token":""},{"visibleIds":"0","definitionExpression":null,"url":"http://fwb-gissrv/ArcGIS/rest/services/Maps/CityLimits/MapServer","alpha":1,"type":"AGS","name":"City Limits","token":""},{"visibleIds":"0,1,2","definitionExpression":null,"url":"http://fwb-gissrv/ArcGIS/rest/services/Maps/Addresses/MapServer","alpha":1,"type":"AGS","name":"Addresses","token":""}]
0 Kudos
TomSchuller
Frequent Contributor
The warnings can be ignored.

Your current problem is coming from the Flex4.6.
In fact I just tested the compilation, not the execution 😞

In PChPrintWidget.mxml, the method "printResult" does get the json string information from the SOE, but seems to parse it not correctly.

Could you replace the method by this code and rerun it in DebugMode:

            private function printResult(searchResult:Object):void {
    if (currentState=="stateSelectExtent")
                 btnPrint2.enabled=true;
    else
     btnPrint.enabled=true;
                var resultString:String=searchResult.toString();
    trace("resultString: "+resultString);
                if(resultString.indexOf("<html>")>-1) {
                    Alert.show(resultString, "Error during print!");
                } else {
                    var obj:Object=com.esri.ags.utils.JSON.decode(searchResult.toString());
     trace("obj.outputFile: "+obj.outputFile);
                    if(obj.outputFile) {
      //todo: preparations for ArcGIS 10.1
      if(obj.outputFile.indexOf("/rest/directories")==0) {
       obj.outputFile = "http://localhost:6080/arcgis"+obj.outputFile;
      }
      trace("obj.outputFile: "+obj.outputFile);
                        navigateToURL(new URLRequest(obj.outputFile));
                    } else {
                        Alert.show(searchResult.toString(), "Error during print!");
                    }
                }
            }



Post me the Debugger console output.

Tom
0 Kudos