static void Main(string[] args)
        {
            PrinterClass.SetDefaultPrinter("Microsoft Print to PDF");

            int FM = 703;
            int MW = 366;
            int NA = 532;
            int RM = 333;
            int TD = 267;

            int i        = 0;
            int filename = 001;

            while (i < FM + 1)
            {
                string filepath   = "C:/Temp/fixed/fixed" + i + ".html";
                string exportpath = "C:/Temp/pdf/" + filename.ToString("0000") + ".pdf";
                string cmd        = "C:\ncd C:/Program Files/wkhtmltopdf/bin";
                string cmd2       = "\nstart wkhtmltopdf.exe --page-size A6 --margin-bottom 0 --margin-left 0 --margin-right 0 --margin-top 0 " + filepath + " " + exportpath;
                File.WriteAllText(@"C:/Temp/bat/" + i + ".bat", cmd + cmd2);
                Process.Start(@"C:/Temp/bat/" + i + ".bat");
                i++;
                filename++;

                //Alter Code, welcher vielleicht wiederverwendet wird.
                //System.Threading.Thread.Sleep(1500);
                //SendKeys.SendWait("^{P}");
                //System.Threading.Thread.Sleep(500);
                //SendKeys.SendWait("{Enter}");
                //System.Threading.Thread.Sleep(2000);
                //SendKeys.SendWait(i.ToString());
                //System.Threading.Thread.Sleep(500);
                //SendKeys.SendWait("{Enter}");
                //System.Threading.Thread.Sleep(2000);
            }
        }
Exemple #2
0
 public BpacPrinter()
 {
     _printer = new PrinterClass();
 }
Exemple #3
0
            public PayloadData(CompletionCodeEnum CompletionCode, string ErrorDescription, CommonClass Common = null, CardReaderClass CardReader = null, CashAcceptorClass CashAcceptor = null, CashDispenserClass CashDispenser = null, CashManagementClass CashManagement = null, KeyManagementClass KeyManagement = null, KeyboardClass Keyboard = null, TextTerminalClass TextTerminal = null, PrinterClass Printer = null, CardEmbosserClass CardEmbosser = null, BarcodeReaderClass BarcodeReader = null)
                : base(CompletionCode, ErrorDescription)
            {
                ErrorDescription.IsNotNullOrWhitespace($"Null or an empty value for {nameof(ErrorDescription)} in received {nameof(StatusCompletion.PayloadData)}");

                this.Common         = Common;
                this.CardReader     = CardReader;
                this.CashAcceptor   = CashAcceptor;
                this.CashDispenser  = CashDispenser;
                this.CashManagement = CashManagement;
                this.KeyManagement  = KeyManagement;
                this.Keyboard       = Keyboard;
                this.TextTerminal   = TextTerminal;
                this.Printer        = Printer;
                this.CardEmbosser   = CardEmbosser;
                this.BarcodeReader  = BarcodeReader;
            }