How to show conditional text colors in PDF

Having trouble installing Oxygen? Got a bug to report? Post it all here.
DanTemple
Posts: 26
Joined: Tue Oct 28, 2014 1:19 pm

How to show conditional text colors in PDF

Post 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
radu_pisoi
Posts: 403
Joined: Thu Aug 21, 2003 11:36 am
Location: Craiova
Contact:

Re: How to show conditional text colors in PDF

Post 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.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Radu
Posts: 9045
Joined: Fri Jul 09, 2004 5:18 pm

Re: How to show conditional text colors in PDF

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Anonymous1

Re: How to show conditional text colors in PDF

Post 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.
Stacey
Posts: 43
Joined: Tue Mar 14, 2017 12:36 am

Re: How to show conditional text colors in PDF

Post 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.
Radu
Posts: 9045
Joined: Fri Jul 09, 2004 5:18 pm

Re: How to show conditional text colors in PDF

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
jmichaels
Posts: 9
Joined: Thu Aug 26, 2021 10:16 pm

Re: How to show conditional text colors in PDF

Post 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?
chrispitude
Posts: 907
Joined: Thu May 02, 2019 2:32 pm

Re: How to show conditional text colors in PDF

Post 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 153 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 1353 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 1353 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.
Post Reply