PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Apr 27, 2024 6:19 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Mon Nov 23, 2015 8:50 am 
Offline

Joined: Wed Nov 18, 2015 9:51 am
Posts: 4
Hi,

How can I render Image from corresponding MemoryStream on PDF using MigraDoc. I do not want to save memory stream to file.
At present, I section.AddImage takes only file path and does not support MemoryStream.

However, I see XImage can take a image's memory stream.
Can I convert XImage to Image or any other way this can be done?


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 23, 2015 8:59 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3096
Location: Cologne, Germany
Hi!

With version 1.50 you can read the stream into a string and pass that to AddImage().
See also:
http://www.pdfsharp.net/wiki/MigraDoc_F ... mages.ashx

If you have a MemoryStream then you can simply call GetBuffer() to get the byte[].

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 23, 2015 9:17 am 
Offline

Joined: Wed Nov 18, 2015 9:51 am
Posts: 4
Thanks for the response.

Where can I get the sources for v1.5?


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 23, 2015 9:20 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3096
Location: Cologne, Germany
hemaanshu wrote:
Where can I get the sources for v1.5?
The question should be "When". The answer is "Later this year" and that's all I can say now.
Binaries are on NuGet.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 23, 2015 9:31 am 
Offline

Joined: Wed Nov 18, 2015 9:51 am
Posts: 4
Thomas Hoevel wrote:
hemaanshu wrote:
Where can I get the sources for v1.5?
The question should be "When". The answer is "Later this year" and that's all I can say now.
Binaries are on NuGet.


Currently we are using version 1.32, before I could make a move to newer version can you please help with these questions?

a.) Are there any usage license change from 1.32 to current version?
b.) I understand the current version is a Beta, can you comment on how stable is it and when is the release planned for it?

Thank you.


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 23, 2015 9:42 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3096
Location: Cologne, Germany
Re a: same license.
Re b: it's a beta, but we fixed several bugs. IMHO 1.50 is the better choice.

_________________
Regards
Thomas Hoevel
PDFsharp Team


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

All times are UTC


Who is online

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