Expand my Community achievements bar.

SOLVED

Render Google MAP Static Image in PDF

Avatar

Level 4

Is there any way to use Google Maps API for PDF. I have a form having a text input (which accepts a address eg: city name) & a button. On button click I want to access google map api and display map image inside PDF (Image Field).

Is it possible?

Thanks in advance.

-

Abhinav

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

The only way that I know of is to make a web service call and return the image (base64 encoded). Then bind the result of the web service to the image field.

Paul

View solution in original post

9 Replies

Avatar

Level 4

While looking into Google Map API, I found a way to receive static image (.jpg/.png/etc) by calling the below URL having some needed parameters:

http://maps.google.com/maps/api/staticmap?center=New Delhi,India&zoom=14&size=400x400&sensor=false

This URL response me with a Image. Now I want to use this Image to be displayed in Image Field of a PDF form. It may need to convert this image in Base64 format then assign it to ImageField.rawValue. But before that I need to call this URL and get the Image in some variable.

Please help.

-

Abhinav

Avatar

Level 10

Hi,

I think you are going to come up against security policies for linking an image field to an external source.

If you do a search Bruce has some posts on Base 64 conversions. From memory I think it is server side.

A very rough workaround would be to use gotoURL which will open the image as a separate PDF. This is probably not good enough: http://assure.ly/efov2Y

Good luck,

Niall

Avatar

Level 4

Thanks Niall.

I don't want to open image in new window. I think the same as you, to make a separate Web Service in b/w PDF & Google Maps for getting image data & Base64 conversion. I have explained my problem on http://forums.adobe.com/message/3460808#3460808

I hope you would got the Idea of my problem.

Good Luck to me to get this job done.

-

Abhinav

Avatar

Correct answer by
Former Community Member

The only way that I know of is to make a web service call and return the image (base64 encoded). Then bind the result of the web service to the image field.

Paul

Avatar

Level 2

Just a quick thought, would the Maps API for Flash be an option? Obviously would need the next version of Livecycle Designer?

Avatar

Level 4

I got this done by making my own web services.

But now I am facing another problem. I am only able to access services when I am opening form in Acrobat 9,  But NOT able to access them in Adobe Reader 9. New thread for it @ http://forums.adobe.com/thread/790154?tstart=0

Thanks all.

-

Abhinav

Avatar

Level 10

Hi,

That's because users with Reader cannot make data calls UNLESS the form has

been Reader enabled using LC Reader Extensions. See here:

http://assure.ly/gYyYc2

Applying Reader rights in Acrobat will not work. Data connections will still

be unavailable.

Good luck,

Niall

Avatar

Level 4

Thanks Niall. Can we purchase LC Reader Extension License Separately Or we have to purchase some dependent s/w also? I am currently using Trial Version of LCES2 & my reader extension license has expired.

-

Abhinav

Avatar

Level 10

Hi,

You should talk to the Adobe sales reps in your area. They would be the best to advise on options. Check out:

http://www.adobe.com/products/livecycle/

Hope that helps,

Niall

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----