<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>I basically have the spec to print my map with the desired layers, except for one property that I have not been able to include in the geojson string for the features.  I am using OpenLayers Version 2.12.  The spec is as follows:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><a href="http://mydomain:8080/print/pdf/print.pdf?spec=%7b%22layout%22:%22Letter">http://mydomain:8080/print/pdf/print.pdf?spec={"layout":"Letter</a> portrait","srs":"EPSG:3857","units":"ft","dpi":300,"mapTitle":"Printed from mydomain.com","layers":[{"baseURL":"<a href="http://a.tile.openstreetmap.org/">http://a.tile.openstreetmap.org/</a>","opacity":1,"singleTile":false,"type":"OSM","maxExtent":[-20037508.3392, -20037508.3392, 20037508.3392, 20037508.3392],"tileSize":[256, 256],"extension":"png","resolutions":[156543.03390625, 78271.516953125, 39135.7584765625, 19567.87923828125, 9783.939619140625, 4891.9698095703125, 2445.9849047851562, 1222.9924523925781, 611.4962261962891, 305.74811309814453, 152.87405654907226, 76.43702827453613, 38.218514137268066, 19.109257068634033, 9.554628534317017, 4.777314267158508, 2.388657133579254, 1.194328566789627, 0.5971642833948135]},{"baseURL":"<a href="http://mydomain:8080/geoserver/wv_data/wms">http://mydomain:8080/geoserver/wv_data/wms</a>","opacity":1,"singleTile":true,"customParams":{},"type":"WMS","layers":["wv_data:wv_tax_districts","wv_data:wv_county","wv_data:wv_state"],"format":"image/png","styles":[],"transparent":true},{"type":"Vector","styles":{"1":{"strokeColor":"#000000","strokeOpacity":0.5,"fillColor":"#99FF00","fillOpacity":0.3}},"styleProperty":"_gx_style","geoJson":{"type":"FeatureCollection","features":[{"type":"Feature","properties":{<span style='background:yellow;mso-highlight:yellow'>"_gx_style":1</span>, "rootid":"03-04- 22-0009-0000-0000"},"geometry":{"type":"MultiPolygon","coordinates":[[[[-9096521.031054683,4598298.723518376],[-9096508.058329634,4598338.853603111],[-9096046.00308546,4598028.754632352],[-9096054.460792316,4598022.619581236],[-9096067.676031547,4598007.215465028],[-9096095.49339352,4597959.168712229],[-9096122.568241857,4597918.154104033],[-9096160.503799679,4597875.767949502],[-9096180.603656983,4597852.659764481],[-9096203.843161233,4597823.77633773],[-9096209.261893097,4597816.083499497],[-9096211.57365225,4597811.602560998],[-9096216.243212458,4597804.553092468],[-9096220.114133514,4597799.894358914],[-9096224.773759445,4597794.285915068],[-9096235.60818699,4597783.988215557],[-9096257.2638415,4597768.519091412],[-9096269.681709073,4597763.960168759],[-9096296.739037376,4597752.274799273],[-9096323.073627673,4597750.158696852],[-9096348.661872733,4597743.58521329],[-9096357.126164695,4597741.097003529],[-9096368.756827036,4597737.691704096],[-9096381.859516736,4597735.040114307],[-9096402.03263128,4597729.783522871],[-9096420.59772951,4597725.1641588705],[-9096450.813370682,4597721.1049796855],[-9096486.408399766,4597713.816178738],[-9096517.384951781,4597706.563017243],[-9096552.962476604,4597702.4620325295],[-9096570.043988377,4597701.054553932],[-9096614.952565616,4597696.8810641905],[-9096628.171333157,4597695.720208254],[-9096894.676004061,4598085.73112343],[-9096732.521829559,4598160.354191241],[-9096521.031054683,4598298.723518376]]]]},"id":"mineral.2217","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:OGC:1.3:CRS84"}}},{"type":"Feature","properties":{<span style='background:yellow;mso-highlight:yellow'>"_gx_style":1</span>, "rootid":"03-04- 24-0013-0000-0000"},"geometry":{"type":"MultiPolygon","coordinates":[[[[-9100885.931437397,4595830.641061093],[-9100618.955667052,4595813.922834314],[-9100544.320274929,4595809.239025285],[-9100219.47980554,4595780.614032372],[-9100227.273714347,4595722.363540661],[-9100240.120513162,4595604.891296111],[-9100465.568072638,4595705.5650386475],[-9100553.996820783,4595730.166153842],[-9100619.003285743,4595747.167447766],[-9100660.777464475,4595758.084937326],[-9100824.032890169,4595685.371798294],[-9100840.055007722,4595682.933484964],[-9100849.432155106,4595708.18948892],[-9100863.225394715,4595714.986957449],[-9100867.942023106,4595731.076151991],[-9100887.97905841,4595729.178693363],[-9100888.634211006,4595738.964712751],[-9100881.922785217,4595759.736949781],[-9100879.965270448,4595801.200690653],[-9100885.931437397,4595830.641061093]]]]},"id":"mineral.2237","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:OGC:1.3:CRS84"}}}]},"opacity":1,"name":"Selected Mineral Tracts"}],"pages":[{"center":[-9098467.3186875,4596971.8698045],"scale":12000,"rotation":0}]}<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I have highlighted the property that I need to include in the spec.  I have tried to add it to the geoJson representing the feature by using the following code:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>                var featureFormat = new OpenLayers.Format.GeoJSON();<o:p></o:p></p><p class=MsoNormal>                var featureGeoJson = featureFormat.write.call(<o:p></o:p></p><p class=MsoNormal>                                featureFormat, feature);<o:p></o:p></p><p class=MsoNormal>                featureGeoJson.properties = OpenLayers.Util.extend({<o:p></o:p></p><p class=MsoNormal>                                _gx_style: 1<o:p></o:p></p><p class=MsoNormal>                                },featureGeoJson.properties);<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The problem seems to be that featureGeoJson.properties is not defined.  I know that featureGeoJson is correct because it contains all of the feature information.  My problem is trying to insert _gx_style: 1 as a property into the GeoJson.  Without it MapFish gives the following error:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>2014-02-14 16:52:29,158 ERROR [org.mapfish.print.servlet.BaseMapServlet] - Error while generating PDF<o:p></o:p></p><p class=MsoNormal>DocumentException: <o:p></o:p></p><p class=MsoNormal>org.mapfish.print.JsonMissingException: attribute [spec.layers[2].styles.] missing<o:p></o:p></p><p class=MsoNormal>                at org.mapfish.print.utils.PJsonObject.getJSONObject(PJsonObject.java:134)<o:p></o:p></p><p class=MsoNormal>                at org.mapfish.print.map.renderers.vector.StyledMfGeoFactory.createFeature(StyledMfGeoFactory.java:52)<o:p></o:p></p><p class=MsoNormal>                at org.mapfish.geo.MfGeoJSONReader.decodeFeature(MfGeoJSONReader.java:84)<o:p></o:p></p><p class=MsoNormal>                at org.mapfish.geo.MfGeoJSONReader.decodeFeatureCollection(MfGeoJSONReader.java:75)<o:p></o:p></p><p class=MsoNormal>                at org.mapfish.geo.MfGeoJSONReader.decode(MfGeoJSONReader.java:63)<o:p></o:p></p><p class=MsoNormal>                at org.mapfish.print.map.readers.VectorMapReader.<init>(VectorMapReader.java:75)<o:p></o:p></p><p class=MsoNormal>                at org.mapfish.print.map.readers.VectorMapReader$Factory.create(VectorMapReader.java:57)<o:p></o:p></p><p class=MsoNormal>                at org.mapfish.print.map.readers.MapReaderFactoryFinder.create(MapReaderFactoryFinder.java:39)<o:p></o:p></p><p class=MsoNormal>                ………<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Any suggestions that you may have are greatly appreciated.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Jerome Wendell<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>