First of all, I apologise for my bad English. The css does not work when reading string from html file and converting it to pdf. There is no problem in your online file conversion when converting from html to pdf.
Here …...stream = new MemoryStream(Encoding.UTF8.GetBytes(html1)); byte[]...