Need some help with Postscript
I am working on a program in C++ that generates a Postscript file for bills that is sent to a printer. Basically it should print out a bill template with whoevers information put in the correct places on the form. Any help on these problems would be greatly appreciated.
1. The first bill is printed correctly, but a second page is printed out as well, with the correct form template but no information filled in - the name, address, amount owed, etc are empty.
2. The second bill prints one empty form, the correct bill, and then two empty forms.
3. After printing, the printer lcd flashes data recieved and keeps flashing that until you press the "Cancel Job" button
I haven't been able to find a good tutorial or anything online about postscript, all of what I have is from what one of the other employees told me might work and stuff I have managed to find through google, but I am mainly doing guess and check here.
Here is the contents of one of the PS files:
%!PS-Adobe
(PP2ND) run PP2ND
048 33750 2006pp341510 THE ZONE 1 VAN DE GRAAFF DR BURLINGTON MA01803 1 VAN DE GRAAFF DR 04892572006500000001800000107334 04892572006500000001800000107326 502 0000000000 0000000000 0000021960 0000000000 0000021960 0000000000 0000000000 0000000000 0000000000 000000000 000000000000000219600000000000000000038705000000038705000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000060170000000021465 0000000193530000000193520000000107330000000107320000000000000000000387050000000000000000000000000000 00000000000000000000 000000000 000000000 000000000 000000000 000000000 0003 Machiner 00021960000000000000000000000000000000000000000000TAX PERS.PROP 00000601700000000000000000000000000000000000000000000000000000000006/30/200509/30/200512/30/200503/31/200602/01/2005 00000001000000010733 000000010732 0000336091510 THE ZONE 0000000000000000336091510 THE ZONE 04892572006500000001800000000000 0274000000000000000000000000000000000000193530000000000000000000000000000000000000000000001935200000 0000000000000000000000000000000000000000107330000000000000000000000000000000000000000000001073200000 00000000000000000000000000000000000 000000000000000000000000000000000000 000000038705000000000000000000038705 000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000021465
%%EOF
Any help is appreciated. Thanks!
Edit: If it helps, here is the C++ code generating the file
file << "%!PS-Adobe\n"
<< "(" << psfilename << ") run " << psfilename << "\n"
<< line.c_str() // line is the user's data to go on the bill, all in one line
<< "\n%%EOF\n";
Last edited by robogymnast; 01-19-2006 at 09:40 AM.
|