Nighteyez07

Printing to PDF shows TextSymbol as dots

Discussion created by Nighteyez07 on Sep 10, 2012
We don't have 10.1 on our systems yet so we cannot make sure of the native Print PDF capability there yet. So for the time being I'm using the Export PDF resource from David Spriggs here. I'm able to get my extent, zoom, layers, and graphics to submit properly and display on the map, but my TextSymbols merely show up as dots.

I'm using the function below to pull out the graphics and textsymbols. If I use Firebug to watch the objects as they are being set it shows the TextSymbols with everything in them, the x & y coordinates, the text value of the symbol and everything else.

function getFeatureSet(type){
    var fset = new esri.tasks.FeatureSet();
    dojo.forEach(map.graphics.graphics, function(graphic){
        if (graphic.geometry.type === type) {
            fset.features.push(graphic);
        }
    });
    if (fset.features.length > 0) {
        return fset;
    }
    else {
        return "";
    }
}


When I set the params using this it still shows the points object with the correct data.
var params = {
        "xMin": map.extent.xmin,
        "yMin": map.extent.ymin,
        "xMax": map.extent.xmax,
        "yMax": map.extent.ymax,
        "Spatial_Reference": map.spatialReference.wkid,
        "Map_Scale": esri.geometry.getScale(map),
        "Visiblelayers": dojo.toJson(visiblelayers),
        "Layout": "Landscape8x11",
        "Map_Title": gup('dan'),
        "PointGraphics": getFeatureSet("point"),
        "PolyGraphics": getFeatureSet("polygon"),
        "LineGraphics": getFeatureSet("polyline"),
        "Include_Attributes": false
    };


exportMapGP.submitJob(params, pdfCompleteCallback, pdfStatusCallback, pdfErrorCallback);


Now, once the job is submitted using this and I watch the post in Firebug, this process has stripped out a lot of the data from the points object and no longer includes the symbol data (which mainly consists of the text value), but just has the geometry data.


{"fields":[],"geometryType":"esriGeometryPoint","features":[{"geometry":{"x":574710.500699997,"y":148022.831900001,"spatialReference":{"wkid":32149}}},{"geometry":{"x":576052.617299996,"y":150527.174899999,"spatialReference":{"wkid":32149}}}],"sr":{"wkid":32149}}


If I look at the graphics object of my polygons, it includes both the geometry and the attributes data.

{"fields":[],"geometryType":"esriGeometryPolygon","features":[{"geometry":{"rings":[[[574366.5514732029,147098.23394759124],[573689.2167852002,148283.569651596],[574552.8185124036,148977.83770679875],[575992.1547244095,147843.3021043942],[574366.5514732029,147098.23394759124]]],"spatialReference":{"wkid":32149}},"attributes":{"PerimType":"UNIT_FOOT","PerimSuffix":"ft.","Area":"23,737,749","Description":"","AreaActual":23737749.3409407,"AreaType":"UNIT_SQUARE_FEET","AreaSuffix":"sq ft.","PerimActual":19994.1418730788,"Title":"Zone 1","Perimeter":"19,994"}},{"geometry":{"rings":[[[574976.1526924054,150137.7733600034],[575856.6877868088,151983.51038481077],[576771.0896156125,150798.17468080603],[576957.3566548133,149324.97173440014],[574976.1526924054,150137.7733600034]]],"spatialReference":{"wkid":32149}},"attributes":{"PerimType":"UNIT_FOOT","PerimSuffix":"ft.","Area":"29,594,254","AreaActual":29594254.3168077,"Description":"","AreaType":"UNIT_SQUARE_FEET","AreaSuffix":"sq ft.","PerimActual":23518.5248811593,"Perimeter":"23,519","Title":"Zone 2"}}],"sr":{"wkid":32149}}


So what I'm trying to figure out, is how can I fix this so it will actually place the Text value for the textsymbols on the PDF instead of them just showing up as a dot?

Outcomes