Can't reliably use both classic and modern PDF engines in same application


Our application has a bunch of cfdocuments in it, and we've just upgraded from Lucee 4.5 to 5.3. In order to keep our PDFs rendering correctly, we've set (this.pdf.type = "classic"\;) in our root Application.cfc.

Updated description:

We would like to be able to upgrade our PDFs to the modern rendering engine gradually. This doesn’t seem to be possible currently. A simple API would be to allow each cfdocument tag to specify an engine to use for that document. We’ve implemented this feature in

Original description follows:

However, we're working on some new cfdocuments, and we'd like to use the new PDF rendering engine for those. The only way I've found to do this so far is to put them in a subdirectory, with a child Application.cfc, where we specify (this.pdf.type = "modern"\;). That appears to work, for the most part, but sometimes when we try to use the new modern PDFs, we get an error "please restart your Lucee server!"

That error appears to originate here:

I've checked ApplicationSettings.getApplicationSettings(pc).getType() in both the main and subdirectories, and it is, appropriately, different in the two places. It seems like the thing that's going wrong is that the code in should not be running when we're using the modern PDF engine.

1. Am I right about what's going wrong here?
2. Is our workaround (overriding this.pdf.type in a sub-application) a supported use case?
3. If not, is there another supported way to use the modern PDF engine for some cfdocuments while using the classic engine for others?
4. If not, it seems like we need to add a way to do this, otherwise developers will not be able to migrate to the new engine unless they update all of their cfdocuments at once, which is risky.


CentOS 7.7.1908


Michael Offner
September 7, 2020, 12:56 PM


Michael Offner
September 7, 2020, 1:24 PM

i added the PR and created a new version and attached it to the latest Lucee version, please give this an other try (the NPE).

Pothys - MitrahSoft
September 7, 2020, 3:55 PM

I've checked this issue and its works fine with extension - pdf fixed version.

Ben Nadel
September 9, 2020, 10:18 AM

I just tried the latest snapshot, and it seems to work for me as well. Groovy!

Zac Spitzer
October 28, 2020, 4:09 PM

I just added a note about type="modern|classic" to the Flying Saucer page on docs



Pothys - MitrahSoft


Leon Miller-Out




Fix versions


5.3.8 Sprint 3

Affects versions