I have a pdf file in a base64
string format. I need to convert it to an image (any type) to use further in my code. I have searched SO as well as the web and I have not been successful with anything.
Does anyone have a tried and true method for this?
I can use a third party. I just need a working one!!
Thank you
base64
is the form of string web friendly representation of byte array. you may convert it to a byte array
like this:
byte [] decodedBytes = Convert.FromBase64String (encodedText);
then you may simple save it to a file:
System.IO.File.WriteAllBytes("file.pdf", decodedBytes);
and then finally convert pdf to image
I used the Apitron PDf Rasterizer to convert my file. It is very simple to use and works great. No missing dlls and clear documentation. However, you do need to purchase it.
Thanks to all for assistance
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.