Webgadget as pdf-viewer?
Posted: Fri Mar 22, 2013 1:01 pm
Is it possible to use PB-webgadget as a pdf-viewer?
How to open pdf-file in this gadget?
How to open pdf-file in this gadget?
http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
Procedure NavigationCallback(Gadget, Url$)
If Url$= "http://www.purebasic.com/news.php"
MessageRequester("", "No news today!")
ProcedureReturn #False
Else
ProcedureReturn #True
EndIf
EndProcedure
If OpenWindow(0, 0, 0, 600, 300, "WebGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
WebGadget(0, 10, 10, 580, 280, "http://asw.gmxhome.de/PureBasicBuch.pdf")
SetGadgetAttribute(0, #PB_Web_NavigationCallback, @NavigationCallback())
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
Since the current Firefox version has a built-in PDF viewer, it should work fine even without any additional program, I think.Hadrian wrote:On my computer I disabled IE and use Firefox as browser and Foxit as pdf-reader.
When I execute Josh's code then I get a pdf-viewer inside the webgadget.
Which would be fine if Firefox were the only browser in existence. But what about IE, Chrome, Safari, Opera, and so on?Little John wrote:Since the current Firefox version has a built-in PDF viewer, it should work fine even without any additional program, I think.
MachineCode wrote:But what about IE, Chrome, Safari, Opera, and so on?
I quoted Hadrian's post, and just refered to what happens on his computer.Little John wrote:Since the current Firefox version has a built-in PDF viewer, it should work fine even without any additional program, I think.Hadrian wrote:On my computer I disabled IE and use Firefox as browser and Foxit as pdf-reader.
When I execute Josh's code then I get a pdf-viewer inside the webgadget.