I'm trying to convert html to a PDF using Rotativa but I want to save at as a byte array or a stream so I can easily attach it to a mail or something. I found a solution here but the file can't be opened by any PDF reader because it's not a supported format or the file is corrupted.
Here is another solution from the same thread but I can't figure out what is the required parameters to pass to this function and I couldn't find any documentation for Rotativa online.