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.
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: https://github.com/lucee/extension-pdf/blob/master/source/java/src/org/lucee/extension/pdf/pd4ml/PD4MLPDFDocument.java#L349
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 PD4MLPDFDocument.java 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.