1

Is it possible to set which rendering engine to use when exporting a page using EvoPDF?

The default rendering engine is FireFox apparently whereas I'd need to use IE.

protected void btnPdfCreator_Click(object sender, EventArgs e)
    {
        var htmlCodeToConvert = GetHtmlCode();

        var pdfConverter = new PdfConverter();

        // ideally pdfConverter.RenderingEngine = RenderingEngine.IE.

        var pdfBytes = pdfConverter.GetPdfBytesFromHtmlString(htmlCodeToConvert, this.pageUrl);

        WriteToResponse(pdfBytes, this.Response);
    }

private void WriteToResponse(byte[] pdfBytes, HttpResponse httpResponse)
    {
        httpResponse.Clear();
        httpResponse.Buffer = true;
        httpResponse.AddHeader("Content-Type", "application/pdf");

        httpResponse.AddHeader("Content-Disposition",
            String.Format("attachment; filename={0}.pdf; size={1}", this.pdfFileName, pdfBytes.Length.ToString()));

        httpResponse.Charset = String.Empty;
        httpResponse.BinaryWrite(pdfBytes);
        httpResponse.Flush();
        httpResponse.End();
    }
Álvaro González
  • 142,137
  • 41
  • 261
  • 360
The Light
  • 26,341
  • 62
  • 176
  • 258

2 Answers2

3

EvoPdf is developed by the same team who develop ExpertPDF (http://www.html-to-pdf.net/). ExpertPDF is the older product so although the APIs are almost identical, the EvoPDF API is slightly more refined.

The main difference between the products is that ExpertPDF uses the local IE rendering engine.

FWIW We moved across from ExportPDF to EvoPDF because we didn't want our PDF rending to change if the version of IE changed on the machine.

Mark
  • 1,516
  • 2
  • 14
  • 24
0

It wasn't possible with EvoPdf.

I used Winnovative that uses IE rendering engine by default.

The Light
  • 26,341
  • 62
  • 176
  • 258
  • Hi William. I was suggesting you use ExpertPDF which does use IE rending engine. If you have it working with Winnovative that is great :) – Mark Sep 06 '11 at 11:27