How can I generate a .pcl file from c# ? Suppose i have a text file, or an xls file and I want to print it, I can check the print to file chekbox and i get a file with extension .pcl. How can I achieve this from code, from c#? Most printer drivers know to generate pcl as I've seen.
Asked
Active
Viewed 5,628 times
1 Answers
2
Your question is much too vague to allow a good answer. There are many variants and versions of PCL. Best thing to do is to install the printer driver of a HP device that's similar to the whatever device is going to use the .pcl. If that's unspecified, pick a HP laser printer that as old as possible.
Generate the file by using the PrintDocument class. You'll need to set the PrinterSettings.PrintToFile property to True and assign PrinterSettings.PrintFileName.

Hans Passant
- 922,412
- 146
- 1,693
- 2,536