Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printer Communications
Message
De
02/11/1997 09:56:57
Ian Johnston
Computer Software Solutions
Woodland, Californie, États-Unis
 
 
À
02/11/1997 05:18:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00057835
Message ID:
00057845
Vues:
34
>>I am trying to print receipts to a dot matrix printer using VFP 5.0. In DOS, the following code communicated with the printer and allowed me to set page length to 33 lines:
>>
>>SET DEVICE TO PRINT
>>SET PRINT ON
>>SET CONSOLE OFF
>>
>>?? CHR(27) + CHR(67) + CHR(33)
>>
>>In Windows, I get garbage characters and no change of page length. How am I supposed to send Esc sequences through the Windows driver???
>>
>>TIA.
>>
>>John
>
>Either you have to use Reports and put for fields properties as 'fixed ' and remove the tag 'stretch with over flow'. Manipulate your lines to that of inches or centimetres and calculate the positions before handedly.
>
>OR
>
>use _pagelength, _pageno, _padvance etc. variables in your programming . May be you need to go into very backward , but I fear there is no other way.
>
>OR
>
>Try finding the print commands 'ESCAPE sequences ' for that printer and manipulate. Atleast that should work for atleast that printer.
>
>OR
>
>Try using _PDSETUP .
>
>
>I guessed your situation and gave above solution but I really do not know what you wanted to print actually on printer . Is that from Table , if so why not go for Reports?.
>
>--Satya

The easiest way is to set up your receipt as a custom paper size in windows then set the page size in report writer to that custom size and call the report to print the receipt. One thing to watch for is if you go into the report to edit it make sure to set the custom form size as vfp will use the size that the default printer is set to at the time you save the report. Reference article Q99094 in M$ kb.

Ian
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform