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

Recommended way to draw directly on MigraDoc document
https://forum.pdfsharp.net/viewtopic.php?f=2&t=2678
Page 1 of 1

Author:  abam [ Mon Dec 02, 2013 4:15 pm ]
Post subject:  Recommended way to draw directly on MigraDoc document

I'm struggling to figure out how to elegantly draw directly on a MigraDoc Document from coordinates.

I suppose I could first render my entire MigraDoc Document; save to pdf; reload pdf as PdfSharp PdfDocument; and then get an XGraphics from the desired PdfPage and then go from there. That could work for what I need, but it isn't very nice. So I came to thinking:

Is there a recommended way for doing this?

P.S. I've looked at the Mix MigraDoc and PDFsharp example, but that seems to be concerned only with how to stuff MigraDoc into PdfSharp, not the other way around.

Author:  Thomas Hoevel [ Mon Dec 02, 2013 4:25 pm ]
Post subject:  Re: Recommended way to draw directly on MigraDoc document

abam wrote:
P.S. I've looked at the Mix MigraDoc and PDFsharp example, but that seems to be concerned only with how to stuff MigraDoc into PdfSharp, not the other way around.
It works both ways. Create a new PDF page for every new MigraDoc page, let MigraDoc draw it's stuff and then add what you want to add.
That's slightly more elegant than opening the file with PDFsharp after MigraDoc has finished.

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