public void PrintFiscal(string xml) { //using (FileStream file = new FileStream("C:\\x.xls", FileMode.Create, FileAccess.Write)) //{ // MakoPrintXls.GenerateXls(xml, file); //} MakoPrintFiscal.Generate(xml, null); }
public void FiscalPrint(string printXml) { try { lock (this.fiscalPrintLock) { MakoPrintFiscal.Generate(printXml, null); } } catch (Exception e) { this.log.Error(String.Format("PrintingService.FiscalPrint, param:printXml = {0}", printXml), e); throw Makolab.Fractus.Commons.FlexExceptionProvider.GetClientException(e, GetClientLanguageVersion()); } }
/// <summary> /// Generates the chosen document from the input parameters. /// </summary> /// <param name="xml">Xml containing data.</param> /// <param name="xslt">XSL Transformation.</param> /// <param name="printProfileXml">Print profile XML.</param> /// <param name="driverConfigXml">Driver config XML.</param> /// <param name="format">Output format.</param> /// <param name="output">Output stream.</param> public static void Generate(string xml, string xslt, string printProfileXml, string driverConfigXml, OutputFormat format, Stream output) { string inputXml = MakoPrintPdf.TransformXml(xml, xslt, printProfileXml, driverConfigXml); switch (format) { case OutputFormat.Html: case OutputFormat.Xml: StreamWriter writer = new StreamWriter(output); writer.Write(inputXml); writer.Flush(); break; case OutputFormat.Csv: MakoPrintCsv.Generate(inputXml, output); break; case OutputFormat.Fiscal: MakoPrintFiscal.Generate(inputXml, output); break; case OutputFormat.Pdf: MakoPrintPdf.GeneratePdf(inputXml, output); break; case OutputFormat.Xls: MakoPrintXls.Generate(inputXml, output); break; case OutputFormat.Vcf: MakoPrintVCard.Generate(inputXml, output); break; case OutputFormat.Text: MakoPrintText.Generate(inputXml, output, driverConfigXml); break; } }