Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Accessing a printer

For general discussion related FlowStone

Accessing a printer

Postby AnthonyTower » Wed Jan 25, 2012 8:51 pm

Hello all,

In the course of studying FlowStone, I was not capable of finding any support for printing.

Example: Your finished compiled exe has a button in the GUI allowing the user to print on a connected printer the results of an FFT graph and an array of values with some predefined report style page layout (designed at the time the FlowStone schematic was created).

I'm I missing something obvious?

Cheers
AnthonyTower
 
Posts: 29
Joined: Wed Sep 01, 2010 3:22 am

Re: Accessing a printer

Postby DSP » Thu Jan 26, 2012 5:09 pm

If you want to print you have to do it yourself as you need to decide what to print how big it is etc.

One easy way is to create an off-screen bitmap (Bitmap Create) and then save this to a bitmap file (Bitmap Save). You can then print it from there. This works by making a new off screen bitmap of the view connected to the Bitmap Create Module.

I'm sure you can also do it using Ruby, but that might be a bit more work!
Attachments
BitmapSave.fsm
(796.83 KiB) Downloaded 1037 times
DSP
 
Posts: 150
Joined: Fri May 14, 2010 10:55 pm

Re: Accessing a printer

Postby AnthonyTower » Thu Jan 26, 2012 9:18 pm

Vielen dank DSP for the quick and informative response!

An off-screen bitmap, I hadn't thought of that. :o

Where did you find the BitmapSave.fsm DSP ?

Using Ruby I'm guessing I would then just have to add a Ruby component that includes the following function:
system("lpr", filename)
where filename is the name of the off-screen created bitmap.

Once I've leaned FlowStone in greater detail, I will look into using Ruby within FlowStone, but I'm not there yet...

It would be nice, and I'm sure not to difficult to code, a new FlowStone primitive aptly called Print with just two inputs, one that would receive the bitmap, the second a Boolean input that when goes true makes this primitive call-up the Windows Print Dialog and let the printer's drivers take it from there.

Cheers
AnthonyTower
 
Posts: 29
Joined: Wed Sep 01, 2010 3:22 am


Return to General

Who is online

Users browsing this forum: Google [Bot] and 95 guests