PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue May 14, 2024 12:40 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Draw to PDF via Graphics
PostPosted: Thu Jan 21, 2010 12:43 pm 
Offline

Joined: Thu Jan 21, 2010 12:40 pm
Posts: 3
Hi,

I have a control that draws to a Graphics object. Is there a way to PDF though the graphics object?

Cheers,
Thomsen


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 21, 2010 12:51 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3097
Location: Cologne, Germany
PDFsharp defines the XGraphics object for drawing.
Same functionality as a Graphics object.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 21, 2010 12:56 pm 
Offline

Joined: Thu Jan 21, 2010 12:40 pm
Posts: 3
Yes, but the controls takes a Graphics object as a parameter (I'm not the author of the control so I can't change that).

I believe that XGraphics doesn't inherit from Graphics, so that won't work.


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 26, 2010 12:20 pm 
Offline

Joined: Thu Jan 21, 2010 12:40 pm
Posts: 3
bump :-)


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 02, 2010 5:36 pm 
Offline

Joined: Tue Feb 02, 2010 5:28 pm
Posts: 1
I am also having the same Issue and looking for solution. Is anybody from the pdfSharp team that can help us ?




Regards,
Rehan


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 25, 2010 11:00 pm 
Offline

Joined: Tue Mar 16, 2010 2:48 am
Posts: 2
Hi,
I am not sure if you already achieved but I am also having the same problem.
I tried on XGraphics.FromGraphics(graphic, new xsize)

And it still not printed.
If you got an workaround, would you be able to shed some lights?
THanks


Top
 Profile  
Reply with quote  
PostPosted: Tue Mar 30, 2010 7:41 pm 
Offline

Joined: Mon Jan 04, 2010 2:44 pm
Posts: 23
That's unlikely to work; I'd expect that to repeat to the Graphics all drawing commands received by the XGraphics.

I think your best bet is to use a Graphics object to draw somewhere and then use an XGraphics to redraw that "somewhere" on the PDF.
Determining the correct "somewhere" is left as an exercise for the reader.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 92 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