Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
West Wind Connect VS PDF
Message
From
17/08/2000 12:28:52
 
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00406179
Message ID:
00406188
Views:
26
Michel,

>Is it possible to print report directly to the default client printer?

I haven't tried this with PDF, but for auto-printing plain HTML pages, I pop open a new browser window, sized to be very small, and load the HTML with an embedded Active-X control (requires one-time download on first hit) that prints the page, then I shut down the window. It all happens in a flash (literally), but will only work on IE, since it's Active-X.

If you are using IE4 or 5, or the web browser control, you can download the free version of ScriptX, an active-X control that can be inserted into your HTML with the < OBJECT > tag, and can automatically control the printer without the prompt.

>When the page is loaded, you can trigger the print from VFP code by calling a method in the control, or you can control it from script in the page, such as ONLOAD="factory.printing.copies=2;factory.printing.portrait=false;factory.printing.header='';factory.printing.footer='';factory.print()"

The above example would set to landscape mode, eliminate the browser header and footer in the printout, and print two copies.

http://www.meadroid.com/scriptx/index.htm
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Previous
Reply
Map
View

Click here to load this message in the networking platform