• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to create URI action

Explorer ,
Dec 05, 2019 Dec 05, 2019

Copy link to clipboard

Copied

Hello,

I need to create a link to the selected text so that when I click on it a certain page opens in the browser.
I created a PDAnnot object
PDAnnot annot = PDPageCreateAnnot (page, ASAtomFromString ("Link"), & fr);
Now, as I understand it, I need to add an action to this object - PDAction. But I don’t know how to do this. There is no such example in the Acrobat DC SDK in Documentation and in projects.

Help me, please.

TOPICS
Acrobat SDK and JavaScript

Views

2.2K

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
community guidelines
Community Expert ,
Dec 06, 2019 Dec 06, 2019

Copy link to clipboard

Copied

Are you trying to create a javascript that will provide a user with a link that when you click on it it will jump to a designated page inside the same PDF  document?

 

OR,

 

Are you trying to embedd a URL in the PDF document, that when the user clicks on it, it will redirect to a webpage outside of the document and viewed in a default browser?

Votes

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
community guidelines
Explorer ,
Dec 07, 2019 Dec 07, 2019

Copy link to clipboard

Copied

I need a 2nd. To embedd a URL in the PDF document

Votes

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
community guidelines
Community Expert ,
Dec 07, 2019 Dec 07, 2019

Copy link to clipboard

Copied

Votes

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
community guidelines
Explorer ,
Dec 09, 2019 Dec 09, 2019

Copy link to clipboard

Copied

Looks like we're talking about different things. I'm talking about creating an addin application based on Visual C ++, you are talking about working with Acrobat Reader as a user.

Votes

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
community guidelines
Community Expert ,
Dec 09, 2019 Dec 09, 2019

Copy link to clipboard

Copied

Votes

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
community guidelines
Explorer ,
Jan 01, 2020 Jan 01, 2020

Copy link to clipboard

Copied

Thanks. Everything worked out. I used the library sample https://github.com/datalogics/adobe-pdf-library-samples/blob/master/CPlusPlus/Sample_Source/ContentM... (Step 3). But, I had to slightly correct the code: replace the operator
PDAnnot URIAnnot = PDPageCreateAnnot (page1, ASAtomFromString ("Text"), & annotLocation);
to the operator
PDAnnot URIAnnot = PDPageCreateAnnot (page1, ASAtomFromString ("Link"), & annotLocation);
and delete the operator
CosDictPutKeyString (URILinkObj, "Subtype", CosNewNameFromString (inputDocCosDoc, false, "Link"));
After that, the code worked.

Votes

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
community guidelines
Community Expert ,
Jan 01, 2020 Jan 01, 2020

Copy link to clipboard

Copied

Great!

 

And you're welcome. Happy to know that it helped Sir.

Votes

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
community guidelines
New Here ,
Jul 12, 2023 Jul 12, 2023

Copy link to clipboard

Copied

LATEST

Votes

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
community guidelines