【问题标题】:ABCPDF 8 does not generate page when jsapi corechart is used使用jsapi corechart时ABCPDF 8不生成页面
【发布时间】:2013-09-25 09:09:06
【问题描述】:

我正在使用 ABCPDF 8 for .NET 来生成 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);

PDF 生成良好。虽然我在页面中添加了谷歌图表:

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

现在 PDF 生成挂在 AddImageHtml 方法上。 请注意,HTML 本身(带有图表)在浏览器中显示良好。

【问题讨论】:

    标签: .net google-visualization abcpdf jsapi


    【解决方案1】:

    在呈现页面时默认禁用Javascript(当然,Google Charts 需要它来执行任何操作)。请参阅UseScript Property。您可能还需要或想要使用Engine property 将引擎设置为 Gecko 以获得更准确的渲染。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-08-30
      • 1970-01-01
      相关资源
      最近更新 更多