[mapserver-users] PDF Output: How?

Daniel Morissette morissette at dmsolutions.ca
Sat Feb 16 17:19:31 EST 2002


Paul Ramsey wrote:
> 
> (b) In terms of implementation of PDF support in PHP/Mapscript, my
> recommendation would be this:
> 
> (1) that the existing PDF support in PHP be examined, and depended on,
> so that to create PDF version of a map you would first create a standard
> PHP PDF object, then pass that object to the mapscript PDF writing
> function.

Paul,

Taking advantage of the existing PDF module in PHP would be great, and
we've been thinking about doing the same with GD to use the PHP GD
module to add annotations on top of a MapScript imageObj.

The problem is that the PHP GD and PDF modules are separate modules and
we don't have any control on them, each module uses its own data
structures internally and I never saw anything in PHP that allowed
modules to share resources even if they share the same C data structures
at the lower level (a PDF or GD handle is a resource in PHP).

This would be a nice thing to research (when time permits), but I'm
suspecting that we would have to build some kind of bridge to export an
imageObj into a PHP GD image object and vice-versa... and that we would
have to maintain this bridge for every release of PHP... that's the main
reason why we didn't do it yet: it's already hard enough to maintain the
PHP module compatible between PHP versions without this kind of
dependencies with external modules.


BTW, I have created a bug in bugzilla about this... may I suggest that
you both file your conclusions and suggestions in the bug report so that
we have access to all the information if/when we work on this:
 http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=110

Thanks,
-- 
------------------------------------------------------------
 Daniel Morissette               morissette at dmsolutions.ca
 DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------
  Don't put for tomorrow what you can do today, because if 
      you enjoy it today you can do it again tomorrow.




More information about the mapserver-users mailing list