PDFsharp & MigraDoc Foundation https://forum.pdfsharp.net/ |
|
How to add image stream to a paragraph https://forum.pdfsharp.net/viewtopic.php?f=2&t=2141 |
Page 1 of 1 |
Author: | srinivas.adavelli [ Fri Sep 14, 2012 1:28 pm ] |
Post subject: | How to add image stream to a paragraph |
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 |
Author: | () => true [ Fri Sep 14, 2012 9:30 pm ] |
Post subject: | Re: How to add image stream to a paragraph |
Hi! You can try the modification described here: viewtopic.php?p=4123#p4123 |
Author: | TH-Soft [ Tue Sep 22, 2015 7:56 am ] |
Post subject: | Re: How to add image stream to a paragraph |
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. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |