Given that coldfusion is 开发者_StackOverflowserver side and javascript is clientside, is there anyway to convert a google map to a pdf using coldfusion?
Why don't you try static google map to embed map in pdf. Static map generate image file which will easily added thorough cfdocument. I haven't tried but it should work...
For more detail see http://code.google.com/apis/maps/documentation/staticmaps/
I suggest wkhtmltopdf. You give it a --javascript-delay of something like 800ms, and you're good to go.
wkthmltopdf is a command line app that runs on a variety of OSes.
This is what I would do:
- Create a page that correctly loads the map that you want to convert to a pdf.
- Use the cfdocument tag to create the pdf. Something like this:
<cfdocument format="pdf" src="[url to your page]" ... />
Be sure to test thoroughly. cfdocument isn't known for it's ability to properly handle CSS.
NOTE: Be sure to check Google's terms of service before you do this.
精彩评论