PDF Chemistry from the command line?

Post here questions and problems related to editing and publishing DITA content.
DavidSaia
Posts: 4
Joined: Thu Aug 26, 2021 11:14 pm

PDF Chemistry from the command line?

Post by DavidSaia »

I hope this hasn't already been discussed; I searched but couldn't find anything.

We want to set up our DITA files in a "docs-as-code" context in which a regularly run script would trigger a transformation.

Can a PDF Chemistry transformation be run from the command line?

If so, how?

Thanks in advance,
julien_lacour
Posts: 498
Joined: Wed Oct 16, 2019 3:47 pm

Re: PDF Chemistry from the command line?

Post by julien_lacour »

Hello,

Sure Oxygen PDF Chemistry can be run from command line, but in your case, as you are using DITA documents you may use Oxygen Publishing Engine instead (requires a specific license).
Oxygen Publishing Engine is based on DITA-OT but provides all Oxygen's specific transformations (like WebHelp Responsive and PDF based on HTML5 & CSS - which uses Oxygen PDF Chemistry under the hood).

To run the transformation, you just need to run a DITA-OT command (from oxygen-publishing-engine-3.x/bin folder) like the following one:

Code: Select all

dita -f pdf-css-html5 -i path/to/your/custom.ditamap -o path/to/out/pdf-css-html5
Other specific parameters are available here, please note that they must be preceded by -D in the command line.

Regards,
Julien
DavidSaia
Posts: 4
Joined: Thu Aug 26, 2021 11:14 pm

Re: PDF Chemistry from the command line?

Post by DavidSaia »

Excellent! Thank you very much for the very quick response!
DavidSaia
Posts: 4
Joined: Thu Aug 26, 2021 11:14 pm

Re: PDF Chemistry from the command line?

Post by DavidSaia »

Followup question: Is the CSS styling with Oxygen Publishing Engine limited to the styles available in the Oxygen Styles Basket, or can I continue to customize the CSS on my own?
julien_lacour
Posts: 498
Joined: Wed Oct 16, 2019 3:47 pm

Re: PDF Chemistry from the command line?

Post by julien_lacour »

Hello,

The styles generated by Oxygen Styles Basket are only a starting point for customizing your PDF/ WebHelp outputs, of course it can be extended!
The only recommendation is to use another style-sheet in which the styles.css file is imported. Like this you will be able to decouple your customization and reupload the CSS onto Oxygen Styles Basket.

Regards,
Julien
Post Reply