PDF Navigation in Webgadget

Just starting out? Need help? Post your questions and find answers here.
PeteM
User
User
Posts: 12
Joined: Thu Mar 05, 2015 8:44 pm

PDF Navigation in Webgadget

Post by PeteM »

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
Little John
Addict
Addict
Posts: 4791
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: PDF Navigation in Webgadget

Post by Little John »

Something like the following works with a sample file, using the current versions of Mozilla Firefox and Google Chrome:

Code: Select all

http://www.example.com/my.pdf#page=3
I haven't tested it with PureBasic's webgadget, though.
Post Reply