Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.
Ben Nadel at cf.Objective() 2009 (Minneapolis, MN) with: Terrence Ryan
Ben Nadel at cf.Objective() 2009 (Minneapolis, MN) with: Terrence Ryan@tpryan )

CFDocument Errors And Resolving DNS

By Ben Nadel on
Tags: ColdFusion

I was trying to get a printed report working for a client using the CFDocument tag. Everything worked fine on the development server, but then broke when uploaded to the production server. Initially, we were getting the following error:

An exception occurred when performing document processing. The cause of this exception was that: coldfusion.document.DocumentProcessTimeOutException: The content of this document process takes more than 20000 milliseconds to process.

The report was really small but did contain HTML markup. As a test, I tried to run it in HtmlEditFormat() to see if the HTML rendering might be causing problems. Yes it was. When converted to text, the CFDocument tag worked just fine.

To try and fix this issue, we installed all the ColdFusion Hot Fixes. This was a new production box (for a single client) and had not been fully updated. After installing the updaters, the above error was fixed, but just replaced with this new error:

The document has no pages. null <br>The error occurred on line 55.

... with a stack trace of:

ExceptionConverter: The document has no pages. at com.lowagie.text.pdf.PdfPages.writePageTree(Unknown Source) at com.lowagie.text.pdf.PdfWriter.close(Unknown Source) at com.lowagie.text.pdf.PdfDocument.close(Unknown Source) at com.lowagie.text.Document.close(Unknown Source) at coldfusion.tagext.lang.DocumentTag.doAfterBody( at cf_print2ecfm2102830720.runPage(....:55) at coldfusion.runtime.CfJspPage.invoke( at coldfusion.tagext.lang.IncludeTag.doStartTag( at coldfusion.runtime.CfJspPage._emptyTag( at cf_index2ecfm1113080573.runPage(....:16) at coldfusion.runtime.CfJspPage.invoke( at coldfusion.tagext.lang.IncludeTag.doStartTag( at coldfusion.runtime.CfJspPage._emptyTag( at cfve_reports2ecfm515217088.runPage(.....:32) at coldfusion.runtime.CfJspPage.invoke( at coldfusion.tagext.lang.IncludeTag.doStartTag( at coldfusion.filter.CfincludeFilter.invoke( at coldfusion.filter.ApplicationFilter.invoke( at coldfusion.filter.RequestMonitorFilter.invoke( at coldfusion.filter.PathFilter.invoke( at coldfusion.filter.ExceptionFilter.invoke( at coldfusion.filter.ClientScopePersistenceFilter.invoke( at coldfusion.filter.BrowserFilter.invoke( at coldfusion.filter.GlobalsFilter.invoke( at coldfusion.filter.DatasourceFilter.invoke( at coldfusion.filter.RequestThrottleFilter.invoke( at coldfusion.CfmServlet.service( at coldfusion.bootstrap.BootstrapServlet.service( at jrun.servlet.ServletInvoker.invoke( at jrun.servlet.JRunInvokerChain.invokeNext( at jrun.servlet.JRunRequestDispatcher.invoke( at jrun.servlet.ServletEngineService.dispatch( at jrun.servlet.jrpp.JRunProxyService.invokeRunnable( at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable( at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable( at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable( at

The document has no pages?? What the hell is that? After about 45 minutes of commenting out different parts of the HTML and putting things back in, and taking them out again, I finally narrowed down the problem code. It was an image header. The SRC of the image tag was a fully qualified URL to the web site that the production box was hosting.

Obvious problem? Not at all. Servers aren't my thing, so I would have NEVER gotten it had my boss, Jim Curran, not known so much about servers. Apparently the problem has to do with the server trying to resolve the DNS. The way he explains it is that CFDocument had code that called the web. The server then went out of the box to the router at the hosting company to ask for the DNS information. The router then told the server that the DNS resolved to the IP of the very box that was the requesting server (since the server hosted the web site). This apparently blew up in the server's face because this is something known as "Route Back", which I guess is blocked by default. So basically, the server was not being allowed to grab the Image source at the specified URL, the CFDocument tag couldn't handle this (and wouldn't even show an X'd out image), and the page totally crashed.

Now, again, I don't know server stuff, so I don't really know the next step. But, basically my boss fixed this by updating the host file??? on the server that overrides the DNS from the router. As he explained it, the server checks this file first, and now, since there was an entry that said a specific Domain was actually the internal IP address of the server, the server no long went to the router, Route Back was not an issue, and the server could grab the URL data.

So, I am sure some of that is unclear (as it is to me) and perhaps just plain wrong. But, we finally got it fixed.

Looking For A New Job?

Ooops, there are no jobs. Post one now for only $29 and own this real estate!

100% of job board revenue is donated to Kiva. Loans that change livesFind out more »

Reader Comments

It's a fairly common networking mistake. (I'm sure someone will try to yll at me and tell me that they are doing it on purpose, but whatever.) It's especially common in DMZ situations (your web servers live on their own subnet that has a different set of rules for your firewall/router) than the rest of your intranet does. If your intranet has one DNS server on the inside and your DMZ servers can't see that internal server and are instead relying on the public DNS server, things can get a bit hinky.

General flow:
You: Firefox, give me a PDF of the home page of
Firefox: DNS, where is
INTERNAL DNS: is sitting in the DMZ at
Firfox:, gimme a PDF of your home page.
Web Server: One sec while I build it ... Okay, I need an image from DNS, where is
PUBLIC DNS: is on the Internet at
Web Server: Router/Firewall, connect me to
Router/Firewall: Um, no. That would just be dumb. If you are on THAT side of the fence you need to talk to people on YOUR side only. Oh, and you ARE that address, n00b!
Web Server: No I'm not! I'm! kaboom!
Firefox: Dude. WTF?


Hi -

I'm getting that same error for a pdf which is +100 pages and between 3 and 12 fields. I set the requesttime=2000 with no help? I am using cfmx 7.0.2 w/patches enterprise version. WHY??? Any help would be appreciated. Does requesttime work at all for cfdocument at all????



I would suggest taking out any references to things that are URL based (ie. CSS files, Images, etc). Then run the document again to see if it works. If that is the case, then it might be a DNS issues. If it still crashes, then it might be a new error all together.

Let me know what happens.

Ben -- adding another shout out that this just helped us resolve the same problem in our PROD environment. Thanks for taking the time to post...

I'm getting the exact same error running the following code:

<cfdocument format="pdf">
<h1>Hello World!</h1>
<p>Hello everyone!!!</p>

That is the entire contents of the body tags. And I am getting the error in a couple of apps that were working fine up to now??


It seems odd that this document would throw an error if it has no code that is making references to URLs! Crazy!

I am also working on creating invoices for customers and had similar problems, but my problems were related to adding IMAGE SCR directly from same server, same directory. Anytime I include the image, it would take forever to generate PDF file and it will not load image, it will be an empty box.
Someone told me it is related to SSL certificate in IIS, but i am able to browse any other page on the site with no problems.
I also imported SSL cert to Coldfusion's cert directory using command line and keytool.

Any idea why it will still no load image?
Or how does CF 8 interact with SSL Cert applied to IIS


It might be the same routing issue that I was having? I don't know too much about sever setup, but did you try the route back stuff?

I would love to have a similar thing to cfdoc tag for other files like .csv files.

I'm feed up ending up with lots of files on my server that I need to clean up.

You know any workaround?

This was what I wanted to do:

<cfsavecontent variable="test">

test csv content

<cfmail from="test" to="test" subject="csv attachment test">
<cfmailparam disposition="attachment" file="testDoc.csv" type="text/csv" content="#test#" >
mail content: blah blah


Guys I had a issue today in that when I uploaded an invoice document to the production server all sorts of error messages kept appearing "An exception occurred when performing document processing.
The cause of this exception was that: coldfusion.tagext.lang.DocumentTagException: An exception occurred when performing document processing.." after reading this post and commecting all my html out of the page I then realised this file was trying to be saved on the server in a directory that does not exist so hence the error message, I created the directory and bang it works fine. Adobe please can we get some "Friendly error messages" TA


Ah, now that I see what you're doing, you can actually do that now with CFMailParam using the "Content" attribute. The Content attribute allows you to attach binary information to the email without going to the file system:

I hope that helps.


Yeah, you will definitely come across some error messages that lend no insight at all. One of my personal favorites is the "null null" error.... that's all you get... "null null". Awesome :)

Hi Ben,

Here i m getting a different case of issue while creating a document. Actually weekly there a notification going to the client regarding the product e4xpiry and failing of calibration date in terms of a pdf document ....earlier it was working fine but now its the scheduled task i found the url and tried to run it separately but its giving following error....

Message: An exception occurred when performing document processing.

The cause of this exception was that: /netscape/suitespot/docs/webapps/corp/maintenance/tmp/afigurac_maintenance_notification.pdf (No such file or directory).

but i tried to create a document and placed in the above mentioned location but still its showing the same error...can u please help out in this problem.

As this is an prodcution issue would be better if u will reply it ASAP...



Actually as i mentioned earlier it was working fine with all the pdf generation on every week but suddenly i heard since last 1 month its not getting generated or its not being sent to the recipient



Very strange. If you're using something like getTempDirectory() in order to access that "tmp" folder (though I doubt it, based on the path), it could be failing. I've had that happen - getTempDirectory() starts to fail randomly.

Double-check to make sure all those directories actually work. And, that ColdFusion has permissions to access them.


hey sry ben , there was one path issue where it was missing one folder called tmp , for that reason it was showing the its fixed .

Many Thanx for ur quick respond and cooperation.

Surely i will get in touch with u for further assistance if i need anything from u ....


Hey i was using itext in java and i had a similar problem, when i read your post, i realized a posible problem!!

So i fix it, thanks for share your experience.