Code:
MigraDoc.DocumentObjectModel.Tables.Cell.AddImage(string fileName)
This function leaves the image stream open which makes it impossible to delete the image file while the app is still running!
Why don't you implement a constructor of Image class with a stream parameter instead of (or in addition to) the path parameter?
I have all my images stored in a databese as byte[].
I have to save them as image files,
then build the pdf file
and then when i try to clean up and delete the images
i get an exception that the files are still in use.
even though the pdf file is already closed.
the bug is not in my code because when I save the byte[] to image files
and skip the part when I add the image to the pdf,
all images are successfully deleted.
Other than that I wish to thank you for this wonderful tool.