PDF Output

ANDY CANFIELD andy_canfield at HOTMAIL.COM
Tue Aug 17 23:44:19 EDT 2004


For php mapscript you need to have pdf support on the server. I used pdflib
lite's source ( Dylan from this list clued me in to the fact that the lite
version is free and open source and works just fine for this ) and compiled
it into a .dll I put the .dll on the server then used the php pdf commands
to insert a png map into the pdf. If nobody beats me to it I'll post the
code tommorow from work as that is where my code is at and I don't remember
the commands off the top of my head. It ends up being a really easy thing to
do. It's only a few lines of code to do it so I'll check back in the am my
time GMT -8hrs and if nobody has posted any code and answered your question
already I'll post mine then. I don't do it the same way the wiki describes I
actually create a pdf for my users in a temp folder on the server and then
give them a link to it. That way if they hit the button accidentaly to
generate a pdf they can simply choose not to click the link to retrieve it
and it doesn't slow their browsing experience down. Especially in Mozilla
Firefox which freezes everything in all tabs until the pdf you are trying to
view is fully downloaded to the users machine. Then the pdf's get deleted
nightly out of that folder.


>From: Dick Vlaanderen <dick at MULTITASK.CO.NZ>
>Reply-To: Dick Vlaanderen <dick at MULTITASK.CO.NZ>
>To: MAPSERVER-USERS at LISTS.UMN.EDU
>Subject: [UMN_MAPSERVER-USERS] PDF Output
>Date: Wed, 18 Aug 2004 12:14:24 +1200
>
>Could anyone tell me how I can produce a map as pdf output using
>mapscript 4.2.2. I am using annotation layers in my map.
>
>Regards
>
>Dick Vlaanderen
>

_________________________________________________________________
Check out Election 2004 for up-to-date election news, plus voter tools and
more! http://special.msn.com/msn/election2004.armx



More information about the mapserver-users mailing list