How do I convert byte[] into a PDF document in C#?
I want to create a PDF file from the byte[] into c:/PDF/test.pdf
How do I convert byte[] into a PDF document in C#? I want to
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The simplest way is using
File.WriteAllBytes:No need for opening streams, worrying about closing them properly etc – it does it all for you.
That’s assuming
dataalready contains the PDF document appropriately, of course. If you haven’t already got a PDF, you’ll need to tell us what’s in thebyte[]…