New topic: 

How to go about Printing a WebPage - i.e. Browser dialog?

<http://forums.realsoftware.com/viewtopic.php?t=45987>

         Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic          Author  
Message        kgingeri          Post subject: How to go about Printing a 
WebPage - i.e. Browser dialog?Posted: Mon Nov 19, 2012 6:00 pm                  
               
Joined: Fri Nov 02, 2012 1:45 am
Posts: 13
Location: Ontario, Canada                Hi All,

Fairly new to RB WE but progressing well.  I have a simple question and I can't 
seem to find answers here or other places.

What I want to do:
I have a Gala registration app and once registered, I want the user to be able 
to print a receipt.  Of course it would be nice to generate and print the 
receipt with no user intervention but....(next section)

I'll Assume:
You can't just call a print command, as that would be a big security issue.You 
can call up the Browser's print function so at least all the user has to do is 
click Print.
What I've tried:
I have a WebPage setup to a format I like, and can pass control to it, 
presenting the user with a dialog about using their Browsers Print menu etc.  
But this is clunky at best, tho working. Some of my potential users don't even 
know what you mean when you say "browser"; let alone know how to print, or know 
exactly what I'm trying to tell them to do.  I have VERY simple users I've 
tried using "self.ExecuteJavascript("javascript:window.print();") in the 
receipt page's Shown() event, but I don't get the dialog until I stop the web 
app - I don't understand this behaviour at all?!  I've tried creating a 
WebHTMLViewer object and putting the "javascript:window.print();" there (or 
"WebHTMLViewer.print"), but of course it brings up a blank page - the receipt 
info isn't in the viewer and I'm not sure how to get it there.  There doesn't 
seem to be a way to inject HTML into it, only call up a page off the internet 
(why not even local page to the project - i.e. reference my WebPageReceipt 
page?)
Anyway, thanks to Any who care to respond
Karl   
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to