PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Fri Jul 05, 2024 4:22 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Mon May 13, 2013 7:53 pm 
Offline

Joined: Wed May 08, 2013 10:56 am
Posts: 17
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");


Top
 Profile  
Reply with quote  
PostPosted: Tue May 14, 2013 8:08 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
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.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 69 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group