Forum How do I...?

How can I use a particular license.dat file without changing the installation tree?

rse
By default the CLI prince(1) reads the "license.dat" file from <prefix>/license/license.dat where <prefix> can even be controlled with the (undocumented?) command-line option "--prefix". Fine, this allows us to place <prefix> at an arbitrary location. But how can a "license.dat" file be used which is located _OUTSIDE_ of <prefix>? This is useful if the material under <prefix>/ is not writable by the user (so he cannot write his license.dat into <prefix>/license/license.dat) using the prince(1) command.

A "strings prince | grep license" (for PrinceXML 9.0r4) shows up a "license-key" and actually prince(1) accepts this (also undocumented?) "--license-key" option. It even requires an argument. But whatever I pass to it (a relative pathname to a "license.dat", an absolute pathname or even the content of "license.dat" via "`cat ...`"), nothing happens. The CLI prince(1) always just silently seems to ignore it and the <prefix>/license/license.dat is still read. A "--show-license" indicates this, too.

So, can anybody tell me how the "--license-key" option is intended to be used? And independent of this option I discovered, is there any chance to use a read-only <prefix> with a separately stored "license.dat" file?

PS: Background of all this is that I currently work on newer Node.js integration for PrinceXML and there I would like the user to be able to specify their own "license.dat" file under _run-time_ without (the admin) having it at hand under _install-time_...
mikeday
Use the --license-file=FILE option.
rse
Perfect! Thanks for the hint. I'm now using this in my new Node/JavaScript integration API for PrinceXML: https://github.com/rse/node-prince