On Fri, Dec 14, 2018 at 12:07 PM Arnaud L. <arnaud.lis...@codata.eu> wrote:

> Hi List
>
> Trying to make simple PDFs using WMS GetMap requests.
> It works great, but I expected the document size to follow the
> format_option:dpi=XXX parameter.
> It is not the case, and in PDFMapResponse.java, I see :
>
> // step 1: creation of a document-object
> // width of document-object is width*72 inches
> // height of document-object is height*72 inches
>
> Why is this hardcoded, and where ?
>

No idea, the PDF output format has been written ages ago by a developer
that's no more active.


> Wouldn't it be a good idea to use the dpi given in format_options to
> build the document ?
>

It indeed seems like a good idea.


> If I understand the iText doc correctly, one could set the document and
> template width and height to width*72/dpi and height*72/dpi, and scale
> the Graphic2D as well to 72/dpi.
> This way, the pdf would still be the same but it's dimension would be
> coherent with the chosen DPI.
>
> Before you ask : I'd gladly propose a change in github, but I have
> almost zero knowledge of Java so I don't feel like I could handle this
> in a reasonable time...
>

At the same time, it is unlikely that anybody will do it for you. I wrote a
guide some time ago about requests of this kind:
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

I also recommend reading these two blogs by Nyall Dawson, they are about
QGIS but really apply to any open source project:

   -
   
https://nyalldawson.net/2016/08/how-to-effectively-get-things-changed-in-qgis/
   -
   
http://nyalldawson.net/2016/08/how-to-effectively-get-things-changed-in-qgis-a-follow-up/

Cheers
Andrea

==

GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information. == Ing. Andrea Aime @geowolf Technical Lead
GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39
0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549
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