0

I am using ABCPDF 8 for .NET to generate PDF.

Doc theDoc = new Doc();
theDoc.HtmlOptions.Engine = EngineType.Gecko;
theDoc.HtmlOptions.UseScript = true;            
theDoc.Rect.Inset(20, 20);
int theID = theDoc.AddImageHtml(html, true, 600, true);

The PDF generates fine. Although I added google charts to the page:

<script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script type="text/javascript">
        google.load("visualization", "1.0", { packages: ["corechart"] });
    </script>

Now PDF generation hangs on AddImageHtml method. Note that the HTML itself (with charts) is displayed fine in the browser.

jlp
  • 9,800
  • 16
  • 53
  • 74

1 Answers1

0

Javascript (which Google Charts, of course, requires to do anything) is disabled by default when rendering pages. See the UseScript Property. You may also need or want to use the Engine property to set the engine to Gecko for a more accurate rendering.

Ross Presser
  • 6,027
  • 1
  • 34
  • 66