Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

printing problem 1

Status
Not open for further replies.

cheikh1

Programmer
Feb 19, 2003
75
MR
i use a matriciel printer to print on
paper a contrast information each data
must be printed on a specified location on the
printer but the problem is that the printer cannot print
until the last place i want to print on.
any idea PLZ?
 
remember that it's a matrix printer, so you print in rows and columns (48 rows on A4 i think).

Describe the problem, what printer, driver, OS, Reporting tool, laguage, versions.
 
thank you
my printer is MICROLINE 3321 ,OS is Win2k Professionel,language delphi5,i print using TOrinter object
and TCanvas.
 
TCanvas for matrix printer ? Why don't you just write into a text file on the disk, then send it to the printer

TIP: use "copy c:\myfile.txt LPT1"
 
plz explain me more, i didn't undrstand how
can print using the file in delph?.
 
If you are using a matrix printer, then you must want to print text. Write that text to a file, then send the file to the printer.
example:"C:\myfile.txt"

----------------- INVOICE -----------------------------

Customer : Microsoft
Address : Redmont, USA Payment method : CARD

Product Quantity Price

MS SQL Server 2 1500$
MS Windows 3 190$

---------------------------------------------------------
 
thank you very much
execuse me i want to know how
can i write on the file programatically
using delphi?, and send the file programatically to the printer?.
my paper must printed after the user click on the button
and the data is on the delphi form.
 
yes, of course you can write

Use AssignFile(), Rewrite(), Writeln(), CloseFile() to write information into a file. Or, if you have the information into, let's say a memo, do a memo.SaveToFile or any file function of your component.

to send a file to printer :

WinExec('copy c:\myfile.txt LPT1', SW_HIDE)

or use ShellExecute()
 
thank you very much.
this is great help
i will try to do this.
i hope that will be ok.
thank you.
 
please i think that the problem comming from
the printer because i took a .txt bfile and i
send it to the printer and the problem still unsolved.
thank you.
 
HI... PLEASE TRY THIS...

WinExec('copy c:\myfile.txt PRN', SW_HIDE);

instead of LPT1 use PRN...

in DOS mode try

copy c:\myfile.txt PRN

...if it works then trying it in delphi using WINEXEC would be the same !!!

 
thank you guys i do all that
but my problem still unresolved.
i want to explain back my problem:
my printer is a matrix printer (OKI MICROLINE 3321)and
i have preorganized paper for printing the information
about our customer's car(we are a sotiety of insurance)
but the printer cannot print on the last lines on the paper
i don't know how can i fix this problem?!
plz don't let me search alone.
 
does it only happens when you try with your Delphi applications? Have you tried file->print from the text document? Have you tried it with several text documents?

michael
 
yes i opened a text file and print it with file->print
the s ame result found .
 
well then I think it is someting wrong with the printer..
Have you tried to print other documents? If it is the same problem then it is the printer.

michael
 
You could try to print the file to another printer if you have more than one printer.. I believe it is something wrong with the printer.

michael
 
thankn u very much.
yes i tried it on UNISYS AP 1359 printer and
it was ok.
do you think that this printer problem can be fixed?.
 
Try looking at the printer setup. I recently encountered a situation with a printer where no matter what paper (labels) that was in the printer it was always looking for 3x5 labels.

No matter what settings we changed it would not print bigger. The print preview even showed that it would print properly!
It turned out that the very first time the printer was turned on 3x5 labels were in it and it remembered this. We had to do a reconfiguration-type reboot from the owners manual.

Point being contact the printer support and tell them your problem, it may just be a five minute solution.

"if it is stupid but it works, then it isnt stupid"
 
Offcourse it can be fixed.. smile.. but it is out off Delphi forum..

reference to awarnica comment:
Point being contact the printer support and tell them your problem, it may just be a five minute solution.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top