Yes, but I had to make changes to the webgis.
For some reason it failed to be able to generate functions, whenever it was
invoked through GET.

I changed the function to:






















































*var spec_html = {        "outputFilename": "Plant_SIG" +
seconds,         "layout": layout,         "srs": "EPSG:
3763",         "units": "m",         "dpi": 300,         "applicant":
applicant,         "title": plant,         "nif": nif,         "freguesia":
parish,         "locality": locality,         "purpose" means:
purpose,         "source": source,         "layers":
[            {                "baseURL":
"http://websig.cm-ourem.pt/geoserver/wms
<http://websig.cm-ourem.pt/geoserver/wms>",                "opacity":
1.0,                "singleTile": false,                "type":
"WMS",                "layers": [layer],                "format": "image /
png"            },            {                "type":
"Vector",                "styles": {                    "":
{                        "fill": false,                        "fillColor":
"# FF0000",                        "stroke-width":
"3",                        "strokeWidth":
3,                        "strokeColor": "#
FF0000",                        "fillOpacity":
0.0                    }                },                "geoJson":
JSON.parse (results_geojson)            }         ],         "pages":
[             {                "center": MapCenter,                "scale":
scale,                "rotation": 0             }         ]    };    var
json_post = (JSON.stringify (spec_html));    $ .ajax ({        url:
'http://websig.cm-ourem.pt/geoserver/pdf/create.json?url=http://websig.cm-ourem.pt/geoserver/pdf/create.json
<http://websig.cm-ourem.pt/geoserver/pdf/create.json?url=http://websig.cm-ourem.pt/geoserver/pdf/create.json>',
       type:
'post',        date: {spec: json_post},        success: function (data,
textStatus, jQxhr) {            window.location.href =
data.getURL;        }    });*

And now, works well

Cumprimentos
*Pedro Henriques*


Mauro Bartolomeoli <mauro.bartolome...@geo-solutions.it> escreveu no dia
quarta, 14/11/2018 à(s) 11:51:

> Hi Pedro,
> I tried to follow your link, and I get a correct PDF.
> Can you confirm it is working also for you now?
>
>
>
> Il giorno mer 14 nov 2018 alle ore 11:56 Pedro Henriques <
> henriques.pedro...@gmail.com> ha scritto:
>
>> Hello,
>>
>> I have installed geoserver 2.13 in Ubuntu server 17.10, and suddenly the
>> print requests stopped working.
>> Through the url http://websig.cm-ourem.pt/geoserver/pdf/info.json, all
>> settings in the config.yaml file appear certain, however, whenever the
>> request is made to generate pdf, it does not work .
>> This happened from one day to the next without any change. Someone with
>> the same problem?
>>
>> an example of the request to generate pdf is: 
>> http://websig.cm-ourem.pt/geoserver/pdf/print.pdf?spec={%22outputFilename%22:%22Planta_SIG154219187.7607%22,%22layout%22:%
>>
>> <http://websig.cm-ourem.pt/geoserver/pdf/print.pdf?spec=%7B%22outputFilename%22:%22Planta_SIG154219187.7607%22,%22layout%22:%20A4_legend,%22dpi%22:300,%22titulo%22:%22PDM%20-%20Ordenamento%22,%22requerente%22:%22%22,%22nif%22:%22%22,%22freguesia%22:%22%22,%22localidade%22:%22%22,%22finalidade%22:%22%22,%22fonte%22:%22PDM%20-%20Ordenamento%20(CMO,%202002)%20%7C%20CAOP%202014%20(DGT,%202014)%20%7C%20SCN%2010K%20(DGT/CIMT,%20Ed.%202005)%22,%22srs%22:%20%22EPSG:3763%22,%20%22units%22:%20%22m%22%20,%22layers%22:[%7Btype:%22WMS%22,format:%22image/png%22,layers:[%22Planta_PDM_Ordenamento%22],%20baseURL:%22http://websig.cm-ourem.pt/geoserver/wms%22,styles:[%22%22],%20customParams%20:%7BBUFFER:0,TRANSPARENT:true%7D%7D,%7Btype%3A%22Vector%22%2Cstyles%3A%7B%22%22%3A%7Bfill%3A%20false%2C%20fillColor%3A%22%23FF0000%22%2Cstroke-width%3A%223%22%2CstrokeWidth%3A%203%2C%20strokeColor%3A%20%22%23FF0000%22%2CfillOpacity%3A%200.0%7D%7D%2CgeoJson%3A%7B%22type%22%3A%22FeatureCollection%22%2C%22features%22%3A%5B%5D%7D%7D],%20%22pages%22:%20[%20%7B%20%22center%22:%20[-36866.926700000186,2200.519849999808],%22scale%22:%2025000,%22rotation%22:%200,%20%7D],%22legends%22%20:%20[%7B%22name%22%20:%20%22%22,%22classes%22%20:%20[%7B%20%22name%22%20:%20%22%22,%20%22iconAfterName%22:%20true,%22icon%22%20:%20%20%22http://websig.cm-ourem.pt/geoserver/wms?version=1.3.0%26TRANSPARENT=TRUE%26SERVICE=WMS%26REQUEST=GetLegendGraphic%26EXCEPTIONS=application/vnd.ogc.se_xml%26LAYER=Planta_PDM_Ordenamento%26FORMAT=image/png%26LEGEND_OPTIONS=forceLabels%3Aon%3BfontName%3DHelvetica%3BfontSize%3A10%3Bdpi%3A300%26MODE=legendicon%22%7D]%7D]%7D]>20A4_legend,%
>> 22dpi% 22: 300,% 22title% 22:% 22PDM% 20-% 20Request% 22,% 22Requireer%
>> 22:% 22% 22,% 22nif% 22:% 22% 22% 22% 22% 22% 22% 22% 22% 22% 22% 22% 22%
>> 22% 22PDM% 20-% 20Resolution% 20 (CMO,% 202002)% 20 |% 20CAOP% 202014% 20
>> (DGT,% 202014)% 20 |% 20SCN% 2010K% 20 (DGT / IACT,% 20Ed.% 202005)% 22,%
>> 22srs% 22:% 20% 22EPSG: 3763% 22,% 20% 22units % 22:% 20% 22m% 22% 20,%
>> 22layers% 22: [{type:% 22WMS% 22, format:% 22image / png% 22, layers: [%
>> 22Plan_PDM_Ordenamento% 22],% 20baseURL:% 22http:
>> //websig.cm-ourem.pt/geoserver/wms%22,styles:[%22%22],%20customParams%20:{BUFFER:0,TRANSPARENT:true}},%7Btype%3A%22Vector%22%
>> 2Cstyles% 3A% 7B% 22% 22% 3A% 7Bfill% 3A% 20false% 2C% 20fillColor% 3A% 22%
>> 23FF0000% 22% 2CstrokeWidth% 3A% 203% 2C% 20strokeColor% 3A% 20% 22%
>> 23FF0000% 22% 2CfillOpacity% 3A% 200% 7D% 7D% 2CgeoJson% 3A% 7B% 22type%
>> 22% 3A% 22FeatureCollec (%) 22% 22% 20% 20% 20% 20% 20% 22% 20% 22% 20% 20%
>> 20% 22center% 22:% 20 [-36866.926700000186,2200.519849999808], % 22scale%
>> 22:% 2025000,% 22rotation% 22:% 200,% 20}],% 22legends% 22% 20:% 20 [%
>> 22name% 22% 20:% 20% 22% 22% 22classes% 22 % 20:% 20 [% 20% 22name% 22%
>> 20:% 20% 22% 22% 20% 22iconAfterName% 22:% 20true,% 22icon% 22% 20:% 20%
>> 20% 22http: // websig .cm-ourem.pt / geoserver / wms? version = 1.3.0%
>> 26TRANSPARENT = TRUE% 26SERVICE = WMS% 26REQUEST = GetLegendGraphic%
>> 26EXCEPTIONS = application / vnd.ogc.se_xml% 26LAYER =
>> Planta_PDM_Ordenamento% 26FORMAT = image / png% 26LEGEND_OPTIONS =
>> forceLabels% 3Aon% 3BfontName% 3DHelvetica% 3BfontSize% 3A10% 3Bdpi% 3A300%
>> 26MODE = legendicon% 22}]}]}]
>> <http://websig.cm-ourem.pt/geoserver/pdf/print.pdf?spec=%7B%22outputFilename%22:%22Planta_SIG154219187.7607%22,%22layout%22:%20A4_legend,%22dpi%22:300,%22titulo%22:%22PDM%20-%20Ordenamento%22,%22requerente%22:%22%22,%22nif%22:%22%22,%22freguesia%22:%22%22,%22localidade%22:%22%22,%22finalidade%22:%22%22,%22fonte%22:%22PDM%20-%20Ordenamento%20(CMO,%202002)%20%7C%20CAOP%202014%20(DGT,%202014)%20%7C%20SCN%2010K%20(DGT/CIMT,%20Ed.%202005)%22,%22srs%22:%20%22EPSG:3763%22,%20%22units%22:%20%22m%22%20,%22layers%22:[%7Btype:%22WMS%22,format:%22image/png%22,layers:[%22Planta_PDM_Ordenamento%22],%20baseURL:%22http://websig.cm-ourem.pt/geoserver/wms%22,styles:[%22%22],%20customParams%20:%7BBUFFER:0,TRANSPARENT:true%7D%7D,%7Btype%3A%22Vector%22%2Cstyles%3A%7B%22%22%3A%7Bfill%3A%20false%2C%20fillColor%3A%22%23FF0000%22%2Cstroke-width%3A%223%22%2CstrokeWidth%3A%203%2C%20strokeColor%3A%20%22%23FF0000%22%2CfillOpacity%3A%200.0%7D%7D%2CgeoJson%3A%7B%22type%22%3A%22FeatureCollection%22%2C%22features%22%3A%5B%5D%7D%7D],%20%22pages%22:%20[%20%7B%20%22center%22:%20[-36866.926700000186,2200.519849999808],%22scale%22:%2025000,%22rotation%22:%200,%20%7D],%22legends%22%20:%20[%7B%22name%22%20:%20%22%22,%22classes%22%20:%20[%7B%20%22name%22%20:%20%22%22,%20%22iconAfterName%22:%20true,%22icon%22%20:%20%20%22http://websig.cm-ourem.pt/geoserver/wms?version=1.3.0%26TRANSPARENT=TRUE%26SERVICE=WMS%26REQUEST=GetLegendGraphic%26EXCEPTIONS=application/vnd.ogc.se_xml%26LAYER=Planta_PDM_Ordenamento%26FORMAT=image/png%26LEGEND_OPTIONS=forceLabels%3Aon%3BfontName%3DHelvetica%3BfontSize%3A10%3Bdpi%3A300%26MODE=legendicon%22%7D]%7D]%7D]>
>>
>> Help
>>
>>
>> Cumprimentos
>> *Pedro Henriques*
>> _______________________________________________
>> Geoserver-users mailing list
>>
>> Please make sure you read the following two resources before posting to
>> this list:
>> - Earning your support instead of buying it, but Ian Turton:
>> http://www.ianturton.com/talks/foss4g.html#/
>> - The GeoServer user list posting guidelines:
>> http://geoserver.org/comm/userlist-guidelines.html
>>
>> If you want to request a feature or an improvement, also see this:
>> https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
>>
>>
>> Geoserver-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>
>
> --
>
> Regards,
>
> Mauro Bartolomeoli
>
> ==
> GeoServer Professional Services from the experts! Visit
> http://goo.gl/it488V for more information.
> ==
>
> Dott. Mauro Bartolomeoli
> @mauro_bart
> Technical Lead
>
> GeoSolutions S.A.S.
> Via di Montramito 3/A
> 55054  Massarosa (LU)
> Italy
>
> mobile: +39 393 904 1756
> phone: +39 0584 962313
> fax:      +39 0584 1660272
>
> http://www.geo-solutions.it
> http://twitter.com/geosolutions_it
>
> -------------------------------------------------------
>
> Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE
> 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si
> precisa che ogni circostanza inerente alla presente email (il suo
> contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è
> riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il
> messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra
> operazione è illecita. Le sarei comunque grato se potesse darmene notizia.
>
> This email is intended only for the person or entity to which it is
> addressed and may contain information that is privileged, confidential or
> otherwise protected from disclosure. We remind that - as provided by
> European Regulation 2016/679 “GDPR” - copying, dissemination or use of this
> e-mail or the information herein by anyone other than the intended
> recipient is prohibited. If you have received this email by mistake, please
> notify us immediately by telephone or e-mail.
>
>
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to