Open WimVdSAllPhi opened 1 year ago
You are using the wrong library. This library does not support rendering PDF-Pages to bitmaps. In addition, this code:
using (var pageStream = new MemoryStream(page.Stream.Value))
{
using (var bmp = new Bitmap(pageStream))
will not work because the stream you're using does not contain bitmap-data. I'm not really sure, WHAT that stream might contain (if it is present after all). The PDF-spec might reveal details.
Depending on the server you're using (Linux ? Windows ?), there might be different libraries/tools available, but i can't give an any recommendations, because I've never tried what you're trying to accomplish.
Thanks a lot I will look for other library. I run in Windows.
I would like to print on Server side but the code that I have will not work properly and don't find any solution on the internet. The problem is I don't know how to translate a page to a bitmap or image that can be used for the print job. Here is my code :