Source language: Translate to:

Printing

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Printing

Postby ajhunt » Tue Dec 22, 2009 6:35 am

Hi All, am wishing to print web pages off from in a browser window with a print button but only the first 5 pages (or from and to pages). Presently just does a print but if the document is say 20-30 pages then prints its all but only want to do a few pages to save paper etc. Have anyone come across this before or know a plugin which would now achieve this. i.e. something with a set "page range" for printing. Cheers guys and any suggestions appreciated.

Regards
Anthony
ajhunt
 
Posts: 215
Joined: Sat Apr 23, 2005 2:33 pm
Location: United Kingdom

Postby Neosoft Support » Tue Dec 22, 2009 11:16 am

The BrowserPrint action includes a print preview option. For example:

BrowserPrint "WebBrowser1" "PrintPreview"

The preview's print button gives you an opportunity to select which pages you want to print.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Printing

Postby ajhunt » Tue Dec 22, 2009 9:58 pm

Thanks Support. Have just tried that option but am seeking no intervention from a user - just clicking a Print Button and automatically printing 5 pages even if the webpage is a PDF with 50 pages. Thanks for the support and help.

Regards
Anthony
ajhunt
 
Posts: 215
Joined: Sat Apr 23, 2005 2:33 pm
Location: United Kingdom

Postby Neosoft Support » Wed Dec 23, 2009 11:01 am

There may be a way to do it with JavaScript. For example:

BrowserExecScript "WebBrowser1" "window.print()" "JScript"
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby Gaev » Wed Dec 23, 2009 12:13 pm

Anthony:

a) Generally, there are no automated interfaces related to print functions ... imagine navigating to www.IdiotsRUs.com ... and the web page automatically starts to print on your printer.

b) In your case, the rendering of the PDF document would be "outsourced" by the Browser to the Acrobat Reader/PlugIn ... so printing any part of it would really be handled from within this program.
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest