Not able to apply css styling to pdf
Posted: Mon Jun 03, 2024 12:02 pm
Hi,
I am working on
The end result is plain black and white. But I want to add styling to the document using custom css.
I have followed all the steps in
https://www.youtube.com/watch?v=rs04iX_RdIk
and
https://www.oxygenxml.com/doc/versions/ ... yling.html
But they still doesn't seem to work using css class. Though I am able to apply css only using the tags, but not using the class.
Here is the example of code I am using:
custom.css
file.dita
I am working on
where I need to generate it in pdf format.API documentation
The end result is plain black and white. But I want to add styling to the document using custom css.
I have followed all the steps in
https://www.youtube.com/watch?v=rs04iX_RdIk
and
https://www.oxygenxml.com/doc/versions/ ... yling.html
But they still doesn't seem to work using css class. Though I am able to apply css only using the tags, but not using the class.
Here is the example of code I am using:
custom.css
Code: Select all
.key {
background-color: red !important;
}
*[outputclass~="key"] codeblock,
*[outputclass~="key"] pre,
*[outputclass~="key"] code {
background-color: red !important;
text-align: center;
}
Code: Select all
<codeblock outputclass="key" id="codeblock_jzg_2z1_lbc">
{
"reponseMsg": "Request is successfully recieved but it is still in progress.",
"requestId": "xxxbc8bf20xxx0000",
"statusCode": 202,
"message": "OK",
"timeGenerated": "2023-02-11T00:00:00.000Z"
}
</codeblock>