I am using the Webgadget under Windows 10. I load a local pdf file into it by navigating to file://filename.pdf. This works just fine, showing the first page of the pdf. However, I want to programatically move to the next page. There does not seem to be a function for this in PureBasic, I can only navigate to a new URL. My solution was to send keystrokes (eg PageDn) to the application, but it doesn't work, because the PDF viewer does not have the focus, and I can't set the focus to it with either SetActiveWindow() or SetActiveGadget(), they don't work. I can see that AcroRead32.exe is running as a sub-process in Task Manager, but try as I might I can't find it in the window list to get its Hwnd.
Any suggestions welcome!
Thanks
PDF Navigation in Webgadget
-
- Addict
- Posts: 4791
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
Re: PDF Navigation in Webgadget
Something like the following works with a sample file, using the current versions of Mozilla Firefox and Google Chrome:
I haven't tested it with PureBasic's webgadget, though.
Code: Select all
http://www.example.com/my.pdf#page=3