Tag: memorystream wkhtmltopdf

wkhtmltopdf输出流和下载 – diaglog

是否有可能从任何html文件中获取由wkhtmltopdf创建的pdf流,并在IE / Firefox / Chrome等中弹出下载对话框? 目前我通过此代码获取我的输出流: public class Printer { public static MemoryStream GeneratePdf(StreamReader Html, MemoryStream pdf, Size pageSize) { Process p; StreamWriter stdin; ProcessStartInfo psi = new ProcessStartInfo(); psi.FileName = @”C:\PROGRA~1\WKHTML~1\wkhtmltopdf.exe”; // run the conversion utility psi.UseShellExecute = false; psi.CreateNoWindow = true; psi.RedirectStandardInput = true; psi.RedirectStandardOutput = true; psi.RedirectStandardError = true; // note that […]