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

Open jpg file

Participant ,
Sep 03, 2023 Sep 03, 2023

Copy link to clipboard

Copied

Hi
please, can someone help me to solve this problem?
I have a folder where I have a folder where there are several jpg files.
these files are named
ONE.jpg
TWO.jpg
THREE.jpg
etc.
In a PDF file I created a drop-down menu called "PHOTO" with the list of file names (ONE.jpg; TWO.jpg; THREE.jpg; etc.)
I would like to create a button that opens the jpg file selected from the drop down menu
The path to the card containing the jpg files is
C:\Users\Name Surname\Documents\AUXILIA\AGENCIES\PHOTOS
I tried with the app.openDoc function but it doesn't work (only works with PDF files)
app.openDoc("C:/Users/Name Surname/Documents/AUXILIA/AGENCIES/PHOTO/"+this.getField("PHOTO").value);
Is there a function to solve this problem?
Thank you

TOPICS
JavaScript

Views

531

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
1 ACCEPTED SOLUTION
Community Expert ,
Sep 04, 2023 Sep 04, 2023

Copy link to clipboard

Copied

Try this:

app.openDoc({cPath: "/C/Users/Name Surname/Documents/AUXILIA/AGENCIES/PHOTO/"+this.getField("PHOTO").valueAsString, bUseConv: true});

 

Note this will only work in Acrobat, not in Reader. And of course the files will have to be located in that exact location for it to work...

View solution in original post

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 ,
Sep 04, 2023 Sep 04, 2023

Copy link to clipboard

Copied

Try this:

app.openDoc({cPath: "/C/Users/Name Surname/Documents/AUXILIA/AGENCIES/PHOTO/"+this.getField("PHOTO").valueAsString, bUseConv: true});

 

Note this will only work in Acrobat, not in Reader. And of course the files will have to be located in that exact location for it to work...

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
Participant ,
Sep 04, 2023 Sep 04, 2023

Copy link to clipboard

Copied

A thousand thanks
so you can't open it with the windows paint program, but only with Acrobat?

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 ,
Sep 04, 2023 Sep 04, 2023

Copy link to clipboard

Copied

Not unless the file is attached to the PDF, no.

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
Participant ,
Sep 04, 2023 Sep 04, 2023

Copy link to clipboard

Copied

LATEST

Okay
thank you very much

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