Beispiel #1
0
        private void GenerateReportFromHtmlToHtml(string htmlSource, string htmlTarget, Placeholders rep)
        {
            string html = File.ReadAllText(htmlSource);

            html = HtmlHandler.ReplaceAll(html, rep);
            File.WriteAllText(htmlTarget, html);
        }
Beispiel #2
0
        private void PrintHtml(string templateFile, string printername, Placeholders rep)
        {
            var htmlContent = File.ReadAllText(templateFile);

            htmlContent = HtmlHandler.ReplaceAll(htmlContent, rep);
            var tempFileToPrint = Path.ChangeExtension(Path.GetTempFileName(), ".html");

            File.WriteAllText(tempFileToPrint, htmlContent);
            LibreOfficeWrapper.Print(tempFileToPrint, printername, _locationOfLibreOfficeSoffice);
            File.Delete(tempFileToPrint);
        }