Page 1 of 1

DITA to PDF using CSS3

Posted: Sun Aug 05, 2018 5:27 am
by daudvyd
Is there a relatively easy and inexpensive way in Oxygen to convert DITA to PDF using CSS3? I understand that there are several excellent commercial products available like Prince, but they are unfortunately outside the price range of my one-man startup. I've been using Oxygen's built-in PDF generator with good results. But, now I would like to create DITA specializations that produce text boxes with curved corners and other graphics and pursuing this in XSL-FO is really daunting. It looks easier in CSS3. Thank you.

Re: DITA to PDF using CSS3

Posted: Sun Aug 05, 2018 4:37 pm
by daudvyd
I just noticed two CSS based transformations in the configuration window. I'll try those first.

Re: DITA to PDF using CSS3

Posted: Mon Aug 06, 2018 12:00 am
by daudvyd
I notice that Oxygen has builtin transformation scenarios for DITA to PDF using CSS. I'm looking in C:\Program Files\Oxygen XML Editor 20\frameworks\dita\css\core to see how different elements are rendered. topic-body.css includes an "example" element (pasted below). How would I trigger this from a DITA file? Doesn't DITA have only the Concept, Task, and Reference types?

Code: Select all

 
* <example>
*
* The example element is a section that contains examples
* that illustrate or support the current topic.
*/
*[class~="topic/example"] {
/*See -colors.css*/
display: block;
margin:1em 1em 1em 1em;
padding:0.5em;
border: 1pt solid;
}
@media oxygen {
*[class~="topic/example"] {
-oxy-foldable: true;
-oxy-not-foldable-child: title;
}
}

Re: DITA to PDF using CSS3

Posted: Mon Aug 06, 2018 9:54 am
by Costin
Hi,

Tasks, concepts and references are DITA specializations, while "<example/>" is an element.
It may be contained in the body of such specialization topics (like taskbody, conbody or refbody).
More details available in the OASIS DITA specification.

Regards,
Costin

Re: DITA to PDF using CSS3

Posted: Mon Aug 06, 2018 8:59 pm
by daudvyd
Costin, thank you for your help. I was able to use the example element. Do the CSS transformation scenarios shipped with Oxygen have full support of CSS3? What part of Oxygen is actually writing the PDF--is that "Chemistry"? Are there any Oxygen training material dedicated to working with DITA and CSS3?

Re: DITA to PDF using CSS3

Posted: Tue Aug 07, 2018 11:48 am
by Costin
Hi daudvyd,

Most of the CSS3 properties are supported in oXygen. For a complete list of the supported CSS3 elements, you should consult the Appendix available in the Chemistry User-Guide.
And yes, Chemistry is our proprietary PDF engine.

There is also the Oxygen DITA-OT CSS Publishing to PDF Plugin User-Guide, that helps in order to work with the available PDF through CSS support in oXygen.

I hope this helps.

Regards,
Costin

Re: DITA to PDF using CSS3

Posted: Tue Aug 07, 2018 4:32 pm
by daudvyd
Thank you. That guide is very helpful.