PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Mar 28, 2024 3:30 pm

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
PostPosted: Fri Sep 14, 2012 1:28 pm 
Offline

Joined: Fri Sep 14, 2012 1:11 pm
Posts: 1
Hi,

I am using Migradoc to generate a PDF document.

I need to add an image (Not from a location, stream comes from database) to a particular paragraph.

I can see only AddImage/Add methods with parameters as string/MigraDoc.DocumentObjectModel.Shapes.Image respectively.

Can I convert the stream to above image type or any other way?

I can use XGraphics.DrawImage, but I do not know how to add it to the specified paragraph.

Is there a way to achieve this?

Thanks,
Srinivas


Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 14, 2012 9:30 pm 
Offline
PDFsharp Expert
User avatar

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

You can try the modification described here:
viewtopic.php?p=4123#p4123

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


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 22, 2015 7:56 am 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 909
Location: CCAA
Hi!
srinivas.adavelli wrote:
Can I convert the stream to above image type or any other way?
With version 1.50 beta 2, there is a solution for this problem: pass the image as a string when you call AddImage():
http://pdfsharp.net/wiki/MigraDoc_FilelessImages.ashx
This method applies to MigraDoc only.
With PDFsharp you can create an XImage from a Stream.

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


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 154 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