Page 1 of 1

How to change the default generated text format in PDF

Posted: Tue Oct 29, 2019 6:05 am
by lhsihan
We write one own CSS file and use it as the CSS file in DITA Map PDF - based on HTML5 & CSS transformation scenario.
The CSS file contains some code like below:

Code: Select all

.sectiontitle tasklabel: {
    color: blue;
    font-weight:bold;
}

When doing transformation, we couldn't get the correct .merged.html and PDF file.

How can we set the the style for the generated text in PDF file?
Thanks a lot.

Re: How to change the default generated text format in PDF

Posted: Tue Oct 29, 2019 12:34 pm
by Dan
Hello,

I think there is a mistake in your CSS.
I think you need to match both tokens from the CSS class attribute.

Please try:

Code: Select all

*[class ~="sectiontitle"][class ~="tasklabel"] {
    color: blue;
    font-weight:bold;
}
Many regards,
Dan

Re: How to change the default generated text format in PDF

Posted: Wed Oct 30, 2019 4:32 am
by lhsihan
Thanks Dan. It works.