coldfusion-大型假脱机文件的cfprint问题 [英] coldfusion - cfprint issues with large spool files

查看:113
本文介绍了coldfusion-大型假脱机文件的cfprint问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用ColdFusion中的cfprint从目录中打印多个PDF.我遇到的问题是,当将文件假脱机到打印机时,文件大小会急剧增加和减慢一切.文件夹中的文件为125K,当它位于打印机假脱机中时,最大增加为15.7MB.这是ColdFusion代码:

I am using cfprint from ColdFusion to print multiple PDFs from a directory. The problem I am having is that when the files are spooled to the printer the size of the file dramatically increases and slows down everything. The file in the folder is 125K and when it is in the printer spool it increases up to 15.7MB. Here is the ColdFusion code:

<cfprint 
    source="[FILELOCATION]/[FILE].pdf" 
    color="yes" 
    printer="[printer name]">

文件最终将打印,但是可能需要15至20分钟.有人对此问题有解决方案吗?我已经尝试过CF生成的PDF和我从头开始创建的PDF.谢谢

The files will eventually print but it can take upwards of 15-20 minutes. Does anyone have any solutions for this issue? I have tried with both CF generated PDFs and ones that I have created from scratch. Thanks

推荐答案

一次排队2到5个.暂停以进行处理.将它们标记为已打印,移动或删除它们,移至下一批...自己进行超时,以查看需要允许的时间.这样一来,您就不会为服务器增加很多工作,也不会在CF服务器上造成瓶颈.

Queue up two to five at a time. Pause to allow processing. Mark them as printed, move or delete them, move to the next batch...Time this out yourself to see how much time you need to allow. That way you don't compound a bunch of work for the server and create a bottleneck on your CF server.

如果您仅在一台服务器上执行此操作,请考虑使用第二台低优先级服务器,并运行开发人员版本 为EULA兼容的Coldfusion注册版本付费的(或Railo) ),并将该服务器专用于打印,以便您的其他服务器可以做有用的事情.

If you are just doing this with one server consider using a secondary low priority server and run a developer edition fully paid for EULA compliant registered version of Coldfusion (or Railo) and dedicate that server for just printing so your other server can do useful things.

修改

因此,OP具有Coldfusion打印瓶颈.在进行打印的服务器中(与我假设的CF服务器相同?),如果这是Windows服务器(不确定您的服务器版本),则有打印队列文件夹.只要您有权访问此文件夹,您就可以做一些事情.您可以创建一种方法,用于将文件通过FTP传输到此文件夹(如果是同一服务器,则可以复制).打印机将使作业排队,然后将其关闭.您可以执行某些功能,例如检查打印队列中的文件计数.如果文件计数大于零,请在15分钟后返回.如果计数为零,请复制更多文件.

So the OP has a Coldfusion print bottleneck. In your server that does the printing (same as your CF server I assume?) and IF this is a windows server (not sure your server version), there is print queue folder. Provided you have access to this folder, you can do a few things. You can create a method for FTP-ing your files to this folder (or copy if it is the same server). The printer will queue up the job and off it goes. You can do some functions like check the print queue for file count. If the file count is greater zero, check back in 15 minutes. If the count is zero, copy over a few more files.

您将在CFAdmin中创建计划任务并使其自动化.有一个getprinterInfo(),因此您可以检查打印机是否脱机,并执行其他操作,例如,如果需要重新路由打印作业,请检查其他地方的其他打印机.您还可以设置多个打印服务器并将打印机连接到它们,然后点击多个打印服务器并检查打印队列文件夹.

You be creating a scheduled task in your CFAdmin and automate. There is a getprinterInfo() so you can check if the printer is off line and do other things like check for another printer somewhere else if you need to reroute print jobs. You can also set up several print servers and attach printers to them and hit several print servers and check print queue folders.

魔术无穷无尽,目标是将工作转移到Coldfusion服务器以外的其他地方.

The magic is endless, goal is to offset work to something other than your Coldfusion server.

所以回顾一下:

  • 通过不进行cfprint来单独解决问题
  • 如果可能的话,创建通往其他尖头的逃生路线.
  • 如果必须使用Coldfusion,则将专用的Coldfusion服务器排队以进行打印管理.
  • 使用getPrinterInfo()并转储出东西以查看可以使用的内容,陷阱等.
  • Ben forta有一个工具可以检查多台打印机,可以考虑将其合并.
  • 如果您具有访问权限并将文件复制到打印队列文件夹,则根本不执行cfprint,然后使用cfftp(如果您在同一台服务器上,则使用cffile).
  • Seperate concerns by not doing cfprint
  • Create escape routes to other priters if you can.
  • If you must use coldfusion then queue up a dedicated Coldfusion server for print management stuff.
  • Use getPrinterInfo() and dump out things to see what you can use, trap etc.
  • Ben forta has a tool that can check for several printers, consider incorperating this.
  • Next use cfftp (or cffile if you are on the same server) provided you have access and copy files to print queue folders, doing no cfprint at all.

此处是打印假脱机内容上的链接(文档中的另一个链接向您展示了如何更改假脱机位置).

结束之后,您将成为具有逃生路线和检查等所有内容的Coldfusion打印大师.

When it is over you are going to be the coldfusion print master with escape routes and checks and everything.

这篇关于coldfusion-大型假脱机文件的cfprint问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆