[eluser]stuartr[/eluser]
[quote author="boltsabre" date="1363866214"]I don't really have any experience on this, just throwing out some ideas.
What happens when you open that notepad file, rather than printing it, is it left or right aligned?
It sounds more like an OS or notepad or printer setting rather than a php thing. What happens when you print a different notepad file not created by your script, does it print right or left?
On another note, you're doing a huge bunch of fwrites, can't you just create one $stringData, and once it's fully populated fwrite it just the once?
Also, perhaps try creating your string at the start of a new line
Code:
$stringData = "
this is my first line of code, starting at the very left
";
No idea if any of this will help in the slightest, but it's some things to look into.[/quote]
I would agree with boltsabre that it is unlikely to be an issue with fwrite.
How and on what are you printing the receipt?