Fixed
Details
Details
Assignee
Pothys - MitrahSoft
Pothys - MitrahSoftReporter
Leon Miller-Out
Leon Miller-OutPriority
Labels
Fix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Sprint
None
Affects versions
Created 2 October 2019 at 15:46
Updated 28 October 2020 at 16:09
Resolved 7 September 2020 at 15:55
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: 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.