At the company I work for we have a laser engraving machine. The laser works like a normal printer for the most part.
Since we mostly make letterboxes we need to engrave numbers on the boxes. I made a program that takes the input from the user and uses it to create a printdocument for the laser.
The device doesn't display a preview of the file so i use the first textbox of the program for the name of the document.
In the windows dialog that shows when sending a print to the device the name displays correctly. Only on the laser, it shows a blank name.
On any other program it displays the document name without problems.
Any ideas?
private void button1_Click(object sender, EventArgs e)
{
PrintDialog printDialog = new PrintDialog();
if (ps != null)
printDialog.PrinterSettings = ps;
if (printDialog.ShowDialog() == DialogResult.OK)
{
PrintDocument docu = printDocument1;
docu.PrinterSettings = printDialog.PrinterSettings;
ps = printDialog.PrinterSettings;
docu.DocumentName = textBox1.Text;
docu.PrintPage += Docu_PrintPage;
docu.Print();
}
}