Page 1 of 1

PDF Navigation in Webgadget

Posted: Wed Aug 29, 2018 6:12 pm
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

Re: PDF Navigation in Webgadget

Posted: Wed Aug 29, 2018 6:32 pm
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.