Copy link to clipboard
Copied
I am running the official Docker Coldfusion Container:
eaps-docker-coldfusion.bintray.io/cf/coldfusion:latest
When I try to create a PDF using <CFDOCUMENT>, I receive the following error message.
I know that lucee had some problems with this based on the Java version, but I assumed that the official image/container would work.
Here is the code block it works great on the exact same version of ColdFusion installed locally.
<cfdocument format="pdf" scale="#URL.scale#">
<cfoutput>#cfhttp.filecontent#</cfoutput>
</cfdocument>
Thank you
Copy link to clipboard
Copied
I'm not so sure that's going to work. The Docker container has a pretty stripped-down version of CF in it, as far as I can tell. CF normally comes with a bunch of platform-specific libraries as well as CF itself. You can connect it to an external add-on service - which would normally be installed on the same machine as CF - but this external add-on service isn't actually part of the Docker container. There are several Docker environment variables that will let you point it to an external source.
Compounding my answer a little bit is that I'm not sure whether the add-on service is responsible for CFDOCUMENT or just the newer CFHTMLTOPDF tags. But I do know that either way, it's using stuff that's not actually part of CF. So I'm not so confident it'll work in any case.
Dave Watts, Eidolon LLC
Copy link to clipboard
Copied
I just ran into this issue, today.
is there a way to specify a pdf service running on a different machine?
Copy link to clipboard
Copied
Did you ever figure out the solution? I just updated Java to openJDK 11 and getting the same error now.
Copy link to clipboard
Copied
Try this:
Step 1: Get inside the container and run the below command:
apt install fontconfig
Step 2: Edit jvm.config file and add the below argument:
--add-exports java.desktop/sun.font=ALL-UNNAMED
Save the file and restart the container.
Thanks,
Vikram
Copy link to clipboard
Copied
Sorry, that did not work for me. But unlike the OP, I am not running a container - it's a VM running Coldfusion 2016 server (Update 17).
Copy link to clipboard
Copied
Perhaps a more appropriate way to add the flag to ColdFusion's jvm.config is:
--add-exports=java.desktop/sun.font=ALL-UNNAMED
Another tip (for ColdFusion 2016 Update 17): use the latest JDK 11.