I have a file:
stirng file = "c:\\test.pdf";
Need to convert into binary and save the binary data into a table of a database.
Thank you.
I have a file:
stirng file = "c:\\test.pdf";
Need to convert into binary and save the binary data into a table of a database.
Thank you.
Hi
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thanks for your inquiry. You can do this using the following simple line of code:
// Reade PDF document bytes.
byte[] docBytes = File.ReadAllBytes(@"C:\Temp\test.pdf");
// Here should be your code to write bytes to DB.
// ................................
I think the following article could be useful for you:
Hope this helps.
Best regards.