Page 1 of 1

How to show conditional text colors in PDF

Posted: Wed Apr 06, 2016 1:07 pm
by DanTemple
Using the built-in DITA PDF transform, the colors assigned to content tagged as conditional do not appear in the resulting PDF.

This makes it less useful when wanting to send a draft out to review by others who do not have the editing tool.

Is this expected, or should it work and am I maybe missing something? Or is there a simple way to achieve this?

regards, Dan

Re: How to show conditional text colors in PDF

Posted: Thu Apr 07, 2016 11:57 am
by radu_pisoi
Hello Dan,

Unfortunately, this feature is not available yet.

We plan to update the PDF output to include review information like track changes, comments or user highlights.

I will add a request to also include the colors assigned to the conditional text.

Re: How to show conditional text colors in PDF

Posted: Tue Apr 12, 2016 11:14 am
by Radu
Hi Dan,

You would have two other possibilities:

1) Use in the transformation scenario a DITAVAL filter file which defines flagging for elements marked with certain profiling attributes:

https://docs.oasis-open.org/dita/v1.2/o ... taval.html

2) If the main DITA Map is opened in the DITA Maps Manager, there is an action on the DITA Maps Manager toolbar called Open Map In Editor With Resolved Topics.
After the DITA Map is opened in the main editor, you can use the File->Print action and print to a PDF driver like Win2PDF that you can install separately.

Regards,
Radu

Re: How to show conditional text colors in PDF

Posted: Wed Apr 27, 2016 11:26 am
by Anonymous1
radu_pisoi wrote:Hello Dan,

Unfortunately, this feature is not available yet.

We plan to update the PDF output to include review information like track changes, comments or user highlights.

I will add a request to also include the colors assigned to the conditional text.
Just wanted to give my +1 on this request. Being able to show feature differentiation in the PDF output would be greatly appreciated.

We need this to provide our translators with proofread PDFs. The print workaround works for now, but it's not pretty at all.

Re: How to show conditional text colors in PDF

Posted: Wed Jan 20, 2021 5:50 pm
by Stacey
Hi Radu:

Are there any updates on this feature (PDF printing that includes conditional text coloured for easy identification)? Is it available now? Was it in the latest version or is it on a roadmap for a future implementation?

Thank you.

Re: How to show conditional text colors in PDF

Posted: Thu Jan 21, 2021 8:16 am
by Radu
Hi Stacey,

Maybe you can create a DITAVAL filter file which flags elements with certain profiling attribute names in certain ways.
Here's an example of such a DITAVAL filter file in the DITA 1.3 specs:

https://www.oxygenxml.com/dita/1.3/spec ... l-val.html

If you edit the transformation scenario in the "Filters" tab you can set a reference to a ditaval filter file.

Regards,
Radu

Re: How to show conditional text colors in PDF

Posted: Wed Feb 16, 2022 12:36 am
by jmichaels
I am trying to get the PDF output to have colored text for review. I have configured a ditaval file like this:
<val>
<prop action="flag" att="rev" val="review" backcolor="purple"/>
</val>

I have tried including the file as a parameter (dita.input.valfile) and by referencing it in Filters > Use DITAVAL file, but I still get the same text. Can you tell me what I am doing wrong?

Re: How to show conditional text colors in PDF

Posted: Wed Feb 16, 2022 11:19 am
by chrispitude
Hi jmichaels,

I think you need to use <revprop> instead of <prop> for @rev highlighting. Here's a sample project for you to try out:

pdf_highlights.zip
(4.47 KiB) Downloaded 154 times

The project defines a "Review content" condition set (Options > Preferences > Editor > Edit Modes > Author > Profiling... > Attributes and Condition Sets). To show the DITAVAL highlighting in the editor, select this condition set in the Filtering drop-down:

image.png
image.png (8.7 KiB) Viewed 1379 times

When this condition set is enabled in the Filtering drop-down, both the DITA Map PDF - based on HTML5 & CSS and DITA Map PDF - based on XSL-FO transformations will automatically use it. This is because they both have the Use currently applied condition set setting selected by default in their transformation definitions:

image.png
image.png (18.15 KiB) Viewed 1379 times

Or, you can define your own "review" PDF transformation that always applies the condition, regardless of what is currently selected, by specifying the DITAVAL file in the Use DITAVAL file part of the transformation configuration. The sample project above includes these always-review transformations too.

One last note - if you configure your transformation to apply a DITAVAL file using the args.filter parameter in Parameters (instead of Use DITAVAL file), and you select Use currently applied profiling condition set in Filters, then Oxygen applies the DITAVAL conditions from both sources for you during transformation. This is extremely powerful, because then you can (1) apply product-specific highlighting/filtering with the Filtering drop-down, and (2) apply review or final flagging in the transformation definitions (via args.filter), and these aspects apply orthogonally. This is how we have our environment configured.