INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Printing legal size.

Printing legal size.

(OP)
Is there a function available that could make certain the printer is using the right size of paper.  Letter size vs Legal size

Thanks  

RE: Printing legal size.

Send the apropriate printer-setup (escape) codes to the printer to select the required paperformat or paperbin, perhaps?

There is no reliable way, except to open the printer manually and measure the paper, to determine if the correct papersize is loaded on the printer. If you are sure it is loaded, but also other papersizes are available, select the correct paperbin using printercodes.
Your program should be aware of the correct amount of information (or lines) to send to the printer to fill up the page.

HTH
TonHu

RE: Printing legal size.

(OP)
Thanks for the info.  I guess I'm stuck.

RE: Printing legal size.

Why does that get you stuck? The larger copier/printer machines at the office automatically select the correct paperbin when asked for different size paper. This is probably handles by the Windows driver. But as Clipper programs usually don't use Windows drivers, we'll have to send the correct codes ourselves. If you can't find the codes, then probably Google is your friend, if it doesn't support direct programming with codes, the use a Windows printerdriver...
There are commercial libraries offering that, but also the open source harbour-project.org or xharbour.org xBase/Clipper compilers have a decent solution.
(x)Harbour offers a Winprint library class, that handles the selection of papersizes, and printing on your installed Windows printers. It's not a simple drop-in replacement, but shuld be manageble, assuming you are a little more experienced in the Clipper programming arena. If your a passing by, help me out please, type of programmer, it can cost a bit more effort to get this all going.
Major advantage of switching to (x)harbour would be the 32 bit executable, giving all sorts of speed and stability improvements, and that can also run your app on Windows x64, if need comes by.

HTH
TonHu

RE: Printing legal size.

(OP)
Thanks I'll see if I have the codes.   

RE: Printing legal size.

hag99,

Most manufactors have the codes on a web site were you can pull them from.   I use the codes to change pitch, bold, landscape, legal, underline, trays.  It's no big deal you can either use the actual code or the CHR value, plug them in, then turn them off.  Use the ?? to turn them on & off.  

Jim C.
 

RE: Printing legal size.

(OP)
Thanks all for your help.  Everything working fine now. So my program is old, stable as can be using clp 5.2e and fivewin 1.92 (very old but works great), I'd like to convert to 32bits.  Any suggestions?

RE: Printing legal size.

hag99

TonHu has been touting XHARBOUR for quite awhile.   I'm still stuck in 5.2e myself.

Jim C.
 

RE: Printing legal size.

(OP)
My program works quite well in Vista and with Fivewin front end it functions as any windows program But one day Micro Soft will do us 16bit guys in. 2010 is new Vista.  Will we survive it?

RE: Printing legal size.

hag99,

My guess is that they will figure out a way to make it backwards compatible.  Just a guess, but I think they'll figure out it's in their best interest to make it work for the 16 bit legacy stuff.   Vista hasn't been a big success for them and I think they'll be looking to get try to do as much as they can to make the market happy.

Jim C.
 

RE: Printing legal size.

(x)Harbour and FiveWin for (x)Harbour would be the most 32 bit solution available to you. With the proper 64 bit compiler, it can even go 64 bit if you need it big smile
Fivewin development is closely following to the development of (x)Harbour, and they usually have the latest versions available. (I'm not a Fivewin user)

Apart from a mandatory MAIN procedure in your (main) Clipper prg, there aren't much prerequisites on switching to (x)Harbour. Btw: I'm writing (x) in front of Harbour to emphasize the fact that both Harbour-project and xHarbour are capable of compiling and running your Clipper applications.
I've been using the compilerswitch to generate c-code instead of p-code (as Clipper does, and (x)Harbour also by default, AFAIK) to get the most speed of my apps as I can, and they seem to fly compared to the executionspeed of Clipper programs.

If you're currently running a x64 version of Windows you'll have trouble getting your 16 bit Clipper apps to run...

HTH
TonHu

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close