예제 #1
0
파일: Program.cs 프로젝트: cmenge/RazorTex
        static void CreateSimpleReport()
        {
            using (LatexRazorRenderer renderer = new RazorTex.LatexRazorRenderer())
            {
                var report = CreateBogusReport();

                List<string> additionalNamespaces = new List<string>();
                additionalNamespaces.Add("Sample");
                renderer.TemplatePath = _templatePath;
                string latexString = renderer.Render(report, additionalNamespaces);

                PdfRenderer pdfRenderer = new PdfRenderer();
                pdfRenderer.RenderPdf(report.Id, latexString);
                Console.WriteLine("Created sample report w/ id {0}", report.Id);
            }
        }
예제 #2
0
파일: Program.cs 프로젝트: cmenge/RazorTex
        static void CreateItinerary()
        {
            using (LatexRazorRenderer renderer = new RazorTex.LatexRazorRenderer())
            {
                var itinerary = CreateBogusItinerary();

                List<string> additionalNamespaces = new List<string>();
                additionalNamespaces.Add("Sample");
                renderer.TemplatePath = _templatePath;
                string latexString = renderer.Render(itinerary, additionalNamespaces);

                PdfRenderer pdfRenderer = new PdfRenderer();
                pdfRenderer.RenderPdf(itinerary.Id, latexString);
                Console.WriteLine("Created sample itinerary w/ id {0}", itinerary.Id);
            }
        }