PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Mar 19, 2024 5:59 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Image creation
PostPosted: Fri Jun 15, 2012 9:40 am 
Offline
Supporter

Joined: Sat Oct 18, 2008 4:15 pm
Posts: 50
Hi

I am generating my own bar like this:
System.Drawing.Image image = new Bitmap(dx, dy);
then saving it to file and including in PDF like this:

MigraDoc.DocumentObjectModel.Shapes.Image bar = doc.LastSection.AddImage(GetImageFileName(1,false));

obviously, it is making generation slow, and problematic in multithreading site.
Is there a way to insert System.Drawing.Image directly from memory, without saving it?

best regards

--G


Top
 Profile  
Reply with quote  
 Post subject: Re: Image creation
PostPosted: Fri Jun 15, 2012 5:21 pm 
Offline
Supporter

Joined: Sat Oct 18, 2008 4:15 pm
Posts: 50
anybody?

I found function
MigraDoc.DocumentObjectModel.Shapes.Image bar = doc.LastSection.Add(MigraDoc.DocumentObjectModel.Shapes.Image)
but I have no clue how to get MigraDoc.DocumentObjectModel.Shapes.Image from Image
:(
please, I googled here and did not find anything


Top
 Profile  
Reply with quote  
 Post subject: Re: Image creation
PostPosted: Sat Jun 16, 2012 8:56 am 
Offline
PDFsharp Expert
User avatar

Joined: Wed Dec 09, 2009 8:59 am
Posts: 339
Hi!

See here:
viewtopic.php?p=2804#p2804

_________________
Öhmesh Volta ("() => true")
PDFsharp Team Holiday Substitute


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

All times are UTC


Who is online

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