DITA to PDF using CSS3

Post here questions and problems related to editing and publishing DITA content.
daudvyd
Posts: 25
Joined: Sun Aug 05, 2018 5:15 am

DITA to PDF using CSS3

Post 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.
daudvyd
Posts: 25
Joined: Sun Aug 05, 2018 5:15 am

Re: DITA to PDF using CSS3

Post by daudvyd »

I just noticed two CSS based transformations in the configuration window. I'll try those first.
daudvyd
Posts: 25
Joined: Sun Aug 05, 2018 5:15 am

Re: DITA to PDF using CSS3

Post 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;
}
}
Costin
Posts: 829
Joined: Mon Dec 05, 2011 6:04 pm

Re: DITA to PDF using CSS3

Post 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
Costin Sandoi
oXygen XML Editor and Author Support
daudvyd
Posts: 25
Joined: Sun Aug 05, 2018 5:15 am

Re: DITA to PDF using CSS3

Post 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?
Costin
Posts: 829
Joined: Mon Dec 05, 2011 6:04 pm

Re: DITA to PDF using CSS3

Post 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
Costin Sandoi
oXygen XML Editor and Author Support
daudvyd
Posts: 25
Joined: Sun Aug 05, 2018 5:15 am

Re: DITA to PDF using CSS3

Post by daudvyd »

Thank you. That guide is very helpful.
Post Reply