Welcome Guest, Not a member yet? Register   Sign In
Text align when creating fwrite()
#6

[eluser]stuartr[/eluser]
[quote author="rochellecanale" date="1363919576"]In notepad the text are all left align but when i print this on my line printer all the text are all right align. But when i decreases the font size of the text manually (in notepad) it centered the text. I used the exec() function to send the line of text in the printer. Here's my sample exec() code.

Code:
$printer = "CSO_PRINTER";  //printer name
exec('NOTEPAD.EXE /PT "'.$myFile.'" "'.$printer.'"');
[/quote]

Line printers are notorious for printing issues - as a previous poster has mentioned you need to find the printer control codes for the device in question, and send these to the printer at the start of the print run.

Depending what else the printer is used for, it may be necessary to send an end of job set of codes as well to return it to its previous state. So once you have got your receipt printing correctly, double check any other prints that use it. I have seen many occasions where sending control codes sort out one problem and cause another.


Messages In This Thread
Text align when creating fwrite() - by El Forum - 03-20-2013, 08:02 PM
Text align when creating fwrite() - by El Forum - 03-21-2013, 04:43 AM
Text align when creating fwrite() - by El Forum - 03-21-2013, 09:36 AM
Text align when creating fwrite() - by El Forum - 03-21-2013, 04:16 PM
Text align when creating fwrite() - by El Forum - 03-21-2013, 07:32 PM
Text align when creating fwrite() - by El Forum - 03-22-2013, 02:09 AM
Text align when creating fwrite() - by El Forum - 03-22-2013, 05:54 AM



Theme © iAndrew 2016 - Forum software by © MyBB