Want to check if it is possible to convert HTML string into docx format and return bytes.
Currently I’m able to convert HTML string into docx and save the file to my disk. And then read this file as byte array from disk. And later delete the physical file. I would like to avoid creating physical file as I just need byte array.
My current code to convert HTML string to docx file and save: (This code works perfectly fine).
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
byte b = File.ReadAllBytes(docFilePath);
Let me know if this is possible.