[OpenLayers-Users] OpenLayers: printing to PDF

John Cole john.cole at uai.com
Mon Jun 18 14:34:02 EDT 2007


Eleanor,
  In our case we were using several ms ajax.net tools and found it easier to
have a separate 'print' page.

  I didn't like this, as we basically copied the main page and made the
adjustments for printing.  For the map, we continued to use OL, but had a
map with no controls and had one untiled wms layer (using all of the layers
we wanted to use for printing).

  In the future, I'm hoping to be able to not resort to this trick, and
modify OL so that all controls and layers that I don't want printed have a
'noprint' css class; taking advantage of the fact that you can assign
multiple css classes to an element.  Then using the stylesheet media option
to select a print stylesheet that sets the noprint class to display:none.  

  We are using this already in our print page to turn off elements we don't
want to show on the print page in an attempt to keep the main page and print
versions somewhat in sync.

  You can see our results at http://hud.uai.com/hudpls

Thanks,

John

-----Original Message-----
From: eleanor at rhcda.com [mailto:eleanor at rhcda.com] 
Sent: Sunday, June 17, 2007 4:26 AM
To: John Cole
Subject: OpenLayers: printing to PDF


Hello, John.

Back in March you posed a question to the OpenLayers list about printing,
and the fact that there is stuff other than the map (legend, etc.) that it
is hard to get directly in PDF form from MapServer (or, in my case,
GeoServer).

I am in the middle of the same problem: I wondered what you ended up doing
and if you could send me a link to your website if it is a public site.  I
could use some good ideas!

Thanks,
Eleanor

> Printing to a pdf via mapserver is ideal when you only need the map
> output,
> but when dealing with the contents of a web based application, the map is
> rarely the sole contents of the page.
> 
> In my case, I have additional information associated with the map that
> needs
> to be included in the report, which rules out using mapserver's pdf
> output.
> I'll also have to create a legend which isn't supported with a mapserver
> pdf.
>
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.



More information about the Users mailing list