PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun May 05, 2024 9:06 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Tue Nov 06, 2012 11:24 pm 
Offline

Joined: Tue Nov 06, 2012 10:43 pm
Posts: 7
Dears,
I am using PDFSharp, version 1.32, GDI+ build.
I have a C# application which uses System.Drawing.Graphics to draw various graphics on GDI.
The Graphics is from a PrintPageEventArgs event e, so it is e.Graphics.
Now I would like to do the drawings on PDF, so here is what I have come up with so far:

string filename = String.Format("{0}_tempfile.pdf", Guid.NewGuid().ToString("D").ToUpper());
PdfDocument s_document = new PdfDocument();
PdfPage page = new PdfPage();
page = s_document.AddPage();
XGraphics gfx = XGraphics.FromPdfPage(page);
//gfx.Graphics.xxxxx methods are used here to draw
//????????????? Need help here!
s_document.Save(filename);
Process.Start(filename);

I use gfx.Graphics to access all the routines that are used currently in GDI+, no problem so far.
So here is the question:
How do I put those drawings on the PDF page. I could not find any examples or guidelines online.


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

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 76 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