Beispiel #1
0
 public void PrintDocumentToFile(String Filename, String Type, String Template, Int64 documentId, String connectionstring)
 {
     datacollection = new DataSet();
     port           = new FilePort(Filename);
     printer        = PrinterFactory.getPrinter(Type);
     port.SetDocumentName("CDS DOC " + documentId);
     job = printer.getDefaultJobProperties();
     PrintDocumentFromTemplate(Template, documentId, connectionstring);
     printer.endJob();
 }
Beispiel #2
0
        public void PrintDocument(String Printer, String Type, String Template, Int64 documentId, String connectionstring)
        {
            datacollection = new DataSet();
            port           = new WindowsPrinter(Printer);
            printer        = PrinterFactory.getPrinter(Type);
            port.SetDocumentName("CDS DOC " + documentId);
            job = printer.getDefaultJobProperties();

            job.draftQuality = true;
            job.pitch        = 10;
            //job.paperSize = PaperSize.LETTER;

            PrintDocumentFromTemplate(Template, documentId, connectionstring);

            printer.endJob();
        }