PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Combining MigraDoc and PDFSharp
https://forum.pdfsharp.net/viewtopic.php?f=2&t=2444
Page 1 of 1

Author:  benfosterdev [ Mon May 13, 2013 7:53 pm ]
Post subject:  Combining MigraDoc and PDFSharp

I had a look at the "Mix MigraDoc and PDFSharp" sample but found how you perform the rendering a little confusing. If I wanted to add a barcode after I've rendered my MigraDoc document I know I can do the following:

Code:
            var renderer = new PdfDocumentRenderer(false, PdfSharp.Pdf.PdfFontEmbedding.Always);
            renderer.Document = doc;
            renderer.RenderDocument();

            AddBarcode(renderer.PdfDocument);


But how might I access the PDFSharp API part way through building a MigraDoc Document? For example:

Code:
            section.AddParagraph("Before barcode");
            // AddBarcode(???)
            section.AddParagraph("After barcode");

Author:  Thomas Hoevel [ Tue May 14, 2013 8:08 am ]
Post subject:  Re: Combining MigraDoc and PDFSharp

A MigraDoc document consists of sections and paragraphs. MigraDoc can handle more than just PDF.
PDFsharp is used only when you render the MigraDoc document to PDF.

Therefore you can jump in when pages are finally rendered to PDF, not when defining the document.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/