JavaScript code to embed a vcard in a button (Action: on click > save contact) should work on android or IOS

Jul 06, 2019

Copy link to clipboard

Copied

can any help me please,
I do have a PDF form with a phone number in it and my client wants the phone number to be clickable and to pop-up a (vcard)

to "save contact"
I have found a way to open the phone number -by clicking on it-  shows on the caller dialing screen to make a call but it is not enough, I need it to open save as contact with all contact details (number, name, address, mail ....etc)
Thanks a lot

You'll need to post the vcard to a public URL and then create a link to it from the button. It needs to be a regular PDF link, not a scripted link. The PDF will execute the link and then the OS takes over and handles the vcard file type.

TOPICS
Acrobat SDK and JavaScript

Views

166

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

JavaScript code to embed a vcard in a button (Action: on click > save contact) should work on android or IOS

Jul 06, 2019

Copy link to clipboard

Copied

can any help me please,
I do have a PDF form with a phone number in it and my client wants the phone number to be clickable and to pop-up a (vcard)

to "save contact"
I have found a way to open the phone number -by clicking on it-  shows on the caller dialing screen to make a call but it is not enough, I need it to open save as contact with all contact details (number, name, address, mail ....etc)
Thanks a lot

You'll need to post the vcard to a public URL and then create a link to it from the button. It needs to be a regular PDF link, not a scripted link. The PDF will execute the link and then the OS takes over and handles the vcard file type.

TOPICS
Acrobat SDK and JavaScript

Views

167

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 06, 2019 0
Jul 06, 2019

Copy link to clipboard

Copied

Even it if was possible with a script, it's highly unlikely to work on mobile devices, at all.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 06, 2019 0
Jul 06, 2019

Copy link to clipboard

Copied

would you explain it more?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 06, 2019 0
Jul 06, 2019

Copy link to clipboard

Copied

The support for JavaScript in PDF applications on mobile devices ranges from non-existent to very limited, especially when it comes to things like opening external files or otherwise interacting with the operating system.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 06, 2019 1
Jul 06, 2019

Copy link to clipboard

Copied

Thanks a lot

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 06, 2019 0
Jul 06, 2019

Copy link to clipboard

Copied

You'll need to post the vcard to a public URL and then create a link to it from the button. It needs to be a regular PDF link, not a scripted link. The PDF will execute the link and then the OS takes over and handles the vcard file type.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 06, 2019 0