RenderPdf() public method

public RenderPdf ( System.Guid temporaryId, string latexString ) : PdfRenderResult
temporaryId System.Guid
latexString string
return PdfRenderResult
Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
        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);
            }
        }