empira / PDFsharp

PDFsharp and MigraDoc Foundation for .NET 6 and .NET Framework
https://docs.pdfsharp.net/
Other
492 stars 114 forks source link

AddImage from Stream #105

Open gao-artur opened 5 months ago

gao-artur commented 5 months ago

Currently the MigraDoc provides a single overload for the AddImage method that accepts a file name. There is another option that wasn't easy to discover. One can pass a specially formatted string, that looks like base64:{base64-ecoded-image}. Please add an overload AddImage(Stream stream) to make the API more dev-friendly.

ThomasHoevel commented 5 months ago

I think that supporting AddImage(Stream stream) is a bad idea.

I think that supporting AddImage(byte[] bytes) could be a good idea.