I want to go to a particular page in a 100 pages pdf file using a push button in matlab GUI. What command should I use in the push button callback function?

5 views (last 30 days)
I want to go to a particular page in a 100 pages pdf file using a push button in matlab GUI. What command should I use in the push button callback function?
  3 Comments
Jorge Mario Guerra González
Edited: Jorge Mario Guerra González on 20 Jan 2017
@Walter Roberson Just realized that when you attemp to open a pdf document with web() it opens Acrobat instead.
web(<pdf direction>)
opens pdf on Acrobat.
Walter Roberson
Walter Roberson on 20 Jan 2017
What web() does is going to depend upon the -browser option; and once you are not using the built-in browser then what is done with pdf is going to depend upon the browser settings.
On my OS-X system, I just used web() on a .pdf without using a -browser option; it opened OS-X's built-in Preview utility, which is not what my default browser is configured to do but is the default for opening pdf files from the file explorer.

Sign in to comment.

Accepted Answer

Jorge Mario Guerra González
The command to do that is:
system("Acrobat directory" /A "page=20" "your file directory");
Do it as if you were doing it on the command line.
As an example of a file I open on my computer.
system('"C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe" /A "page=10" "C:\Users\Jorgue Guerra\Desktop\TrabajoGr.pdf"');
1. Goes to where Adobe instaler the adobe reader
2. sets page 10
3. specifies the file I want to open which is on desktop.

More Answers (0)

Categories

Find more on Dialog Boxes in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!