I have a client that uses multi-part pre-printed stationery for printing their invoices. We have developed a VB.net application for them to use to run their operations and part of the functionality is printing these invoices. Their printer of choice is an OKI ML5521.
I have designed the invoice based on the OKI printer with a fanfold page size of 13.6" x 11" in Crystal Reports 2011 and set it to use the Utility 12cpi font on the printer. I can preview the report in the designer and print it to the printer and it comes out with the correct font, printed in high-speed draft mode.
However, when I print from our application, .Net changes the font and the print mode of the printer to NLQ. As a result it is very much slower and our layout doesn't come out correctly.
I am using the CrystalDecisions.CrystalReports.Engine.ReportDocument object and calling PrintToPrinter(nCopies As Integer, collated As Boolean, startPageN As Integer, endPageN As Integer).
My code looks something like this (simplified version):
oRpt.Load(sReportName)
oRpt.PrintOptions.PrinterName = sPrinterName
ConnectReport(objCon.DataSource, objCon.Database, oRpt)
oRpt.PrintToPrinter(nCopies, False, 0, 0)
I assume I need to take more control of the printer settings using the System.Drawing.Printing.PrinterSettings and System.Drawing.Printing.PageSettings, but I am not able to find much information on this. Any help or links to resources would be appreciated