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

Open jpg file

Participant ,
Sep 03, 2023 Sep 03, 2023

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
839
Translate
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

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

Translate
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

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...

Translate
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

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

Translate
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

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

Translate
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
LATEST

Okay
thank you very much

Translate
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