首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >cfdocument性能问题

cfdocument性能问题
EN

Stack Overflow用户
提问于 2015-02-10 04:53:41
回答 2查看 792关注 0票数 0

我正在使用cfdocument生成一个pdf,它可以很好地与下面的代码一起工作:

代码语言:javascript
复制
<cfdocument format="PDF" fontembed="true" saveAsName="file1" mimetype="application/pdf" localUrl="true">
    <cfoutput>
        #response.filecontent# 
        <cfdocumentitem type="footer"> 
           #cfdocument.currentpagenumber# of #cfdocument.totalpagecount#
        </cfdocumentitem>
    </cfoutput>
</cfdocument>

如果我在其中包含#session.footer#变量,则需要花费大量时间才能生成该文件。

代码语言:javascript
复制
<cfdocument format="PDF" fontembed="true" saveAsName="file1" mimetype="application/pdf" localUrl="true">
    <cfoutput>
        #response.filecontent# 
        #session.footer#
        <cfdocumentitem type="footer"> 
           #cfdocument.currentpagenumber# of #cfdocument.totalpagecount#
        </cfdocumentitem>
    </cfoutput>
</cfdocument>

footer变量包含一个完整的页脚部分,我希望将其添加到文档的末尾。我不明白为什么这要花这么长时间。我使用的是ColdFusion 10。

EN

回答 2

Stack Overflow用户

发布于 2015-07-03 01:21:15

您是否尝试过使用cfdocument创建PDF,然后使用cfpdf作为第二个过程应用页脚?与上面的注释一样,它也可能是会话变量中保存的内容。

我会把这个作为注释而不是解决方案,但是StackOverflow不让我这样做:(

票数 1
EN

Stack Overflow用户

发布于 2017-01-11 06:43:59

查看Windows\system32\drivers\etc\hosts文件。有人已将IP从127.0.0.1更改为某个本地intranet IP,并将名称服务器从localhost更改为DNS服务器名称。我发现只要将IP改回127.0.0.1就足够了。Pdfs已经从非常快的速度增加到超过3分钟。有了变化,他们又变得更快了。(在https://forums.adobe.com/thread/1121909的一条评论中找到了这一点)

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/28419140

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档