<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I am wondering if MapServer support for the "Canvas" tag could do what
Steve suggests in a more simple way. Originally, only Safari, Opera and
Firefox supported this tag to allow (simple) 2D drawing, but recently a
surprisingly simple Javascript interface for IE has become available,
translating Canvas command to native IE VRML commands. It requires just
one single scrip tag in the web page.<br>
<br>
See the tutorial at the Mozilla site at:
<a class="moz-txt-link-freetext" href="https://developer.mozilla.org/en/Canvas_tutorial">https://developer.mozilla.org/en/Canvas_tutorial</a><br>
and the IE interface (from the Google stables) at:
<a class="moz-txt-link-freetext" href="http://excanvas.sourceforge.net/">http://excanvas.sourceforge.net/</a><br>
<br>
This is something I have long been looking for. The graphics are very
simple, so the functionality is nothing like PDF or SVG, but I
could imagine that a driver for MapServer could fulfill many needs. I
can use it already by letting Mapserver generate raw coordinates and
catching them with some sort of Ajax, but a separate driver would be
very neat of course.<br>
<br>
How about it?<br>
<br>
Jan<br>
<br>
Steve Lime wrote:
<blockquote cite="mid:4963A6CD0200008F0001F4B3@co5.dnr.state.mn.us"
 type="cite">
  <pre wrap="">Hi Brent: It's neat to see the possibilities in this area. As an asside I don't think format options
will be useful though. Just too many options. I've wondered if XHTML/CSS could be used, kinda
like query templates. You'd reserve space for the map, legend etc... with css and div's and render
to that space with the appropriate driver.  (wonders about tools like webkit, gecko,...) Would be 
great to author a map layout in a web editor with text and stuff like that surrounding the map. If
you could do that you'd have a winner. Easy to create with a true map-like presentation.

As for where to go? I wouldn't favor supporting compile-time options, rather run-time defs via
output formats. I think there room for both Cairo and Haru assuming one isn't clearly better than
the other. Any opinions there?

Steve

  </pre>
  <blockquote type="cite">
    <blockquote type="cite">
      <blockquote type="cite">
        <pre wrap="">Brent Fraser <a class="moz-txt-link-rfc2396E" href="mailto:bfraser@geoanalytic.com">&lt;bfraser@geoanalytic.com&gt;</a> 01/06/09 5:31 PM &gt;&gt;&gt;
        </pre>
      </blockquote>
    </blockquote>
  </blockquote>
  <pre wrap=""><!---->Hi All,

  I've been investigating some enhancements to make the pdf output more suitable for printed map production.  So far, aside from some minor bug fixes, I've coded a few new FORMATOPTIONS in my local copy of mappdf.c to allow more user control over the placement and scale of the map on the page:

  OUTPUTFORMAT
    NAME pdf
    MIMETYPE "application/x-pdf"
    DRIVER pdf
    FORMATOPTION "PAGE_WIDTH=612"           # (font points)  8.5 inches wide (72 points per inch)
    FORMATOPTION "PAGE_HEIGHT=792"          # (font points)  11 inches tall
    FORMATOPTION "MAP_MARGIN_LEFT=144"      # (font points)  2 inches to the right
    FORMATOPTION "MAP_MARGIN_BOTTOM=144"    # (font points)  2 inches up from the bottom of the page
    FORMATOPTION "SCALEDENOM=50000"         # 1:50,000 scale when printed
  END

Here's a sample of the output (using the HARU pdf library): <a class="moz-txt-link-freetext" href="http://139.142.13.163/Download/Mapserver/topo2_enh_scale3.pdf">http://139.142.13.163/Download/Mapserver/topo2_enh_scale3.pdf</a>

And I've been able to compile Thomas Bonfort's Cairo-based work on Windows XP/VC++ to produce: <a class="moz-txt-link-freetext" href="http://139.142.13.163/Download/Mapserver/topo2_cairo.pdf">http://139.142.13.163/Download/Mapserver/topo2_cairo.pdf</a> (note that my modifications for scale and placement have not been applied to this).

It seems like there's been a renewed interest in pdf output lately, so I'm wondering how to proceed with development.  Should we allow a choice of PDF renderers (Cairo, PDFlib-lite, Haru) at compile-time/run-time?  Re-implement PDFlib/Haru following "plugin" method of the Cairo implementation?  Leave them separate for now and see how much PDF-output interest there is in the Mapserver user community?

Opinions welcome...

Thanks!
Brent Fraser

_______________________________________________
mapserver-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapserver-dev@lists.osgeo.org">mapserver-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapserver-dev">http://lists.osgeo.org/mailman/listinfo/mapserver-dev</a>

_______________________________________________
mapserver-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapserver-dev@lists.osgeo.org">mapserver-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapserver-dev">http://lists.osgeo.org/mailman/listinfo/mapserver-dev</a>

  </pre>
</blockquote>
<br>
</body>
</html>