Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print-to-fit
Message
 
To
14/12/1998 06:21:49
Robert Byrd
National Association of Homebuilders
Washington, District of Columbia, United States
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00167112
Message ID:
00167267
Views:
19
I had to do this in versions 3 & 5 for 2 separate clients and the only way I could figure was setting up a unique page size (and defaulting to that paper) on the printer, then naming the printer uniquely so that the client would see that printer by default when given the printer window.

Here's the code (I didn't modify it at all from the original--the special sized forms were side-holed 11" x 8-1/2", which had to be printed with a contact printer and couldn't be landscaped. The type of forms were called CAS forms, but you can plug in your own words for your card printer.):

APRINTERS(aPrintall)
mCasPrtr =ASCAN(aPrintall, [CAS])
IF mCasPrtr =0
mMsgText=[Before running this procedure, you must set up a CAS Printer. ] +;
[You can leave this message on the screen when you do it. Press the Start Button, ] +;
[then choose Settings/Printers. Double-click on Add Printer. Choose Next twice. ] +;
[From the Manufacturers list, choose the brand of printer you have. ] +;
[On the Printers list, choose your printer. Continue answering the prompts until ] +;
[you see the Finish button, and press it. You may set this printer as your default ] +;
[printer, if you wish. Windows may ask you to insert your original install disks ] +;
[or CD. When this new printer is set up, use the right-mouse button to click on ] +;
[it. Choose the Paper tab. Choose Generic, which is the farthest to the right of ] +;
[the papers from which to choose. When you click on it, make the width 1100 (or ] +;
[the highest you can make it, whichever is lower), and the width 850. Press OK ] +;
[until you are back at your printers list again. Right-click the new printer ]+;
[and choose to rename. It doesn't matter what you rename it, as long as it has ] +;
["CAS" in all capital letters as the first 3 letters of the title. When you are finished, Press the ] +;
[Print button on the CAS form again. ]
mMsgTitle ="Action!"
mAnswer =MESSAGEBOX(mMsgText, 0, mMsgTitle)
RETURN
ENDIF
mPrintName =aPrintall(mCasPrtr)
SET PRINTER TO NAME (mPrintName)

REPORT FORM Cas_shrt TO PRINTER PROMPT NOCONSOLE

Good luck,
Joy

>I want to print VFP output to 4 x 6 index cards and optimize the font so the text will fit without overflowing the page.
>
>I have no idea how to pursue this issue. Is there a library that has it? Do I use a Windows function? Do I roll it myself?
>
>Thanks, Bob
CLARC Services, Inc.
3500 Tamiami Trail
Port Charlotte, FL 33952
www.clarc.com
(941) 743-0108
(800) 246-5488
Previous
Reply
Map
View

Click here to load this message in the networking platform