See the thread "PFD Output: How?" (2002-02-16) on the MapServer-users list for
the full story...
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.