Page 1 of 1

Exclude shortdesc from PDF

Posted: Wed Mar 02, 2022 1:54 pm
by AudreyChr
Hi,
I would like to exclude the shortdesc from the PDF output. It inevitably looks like duplicate text.
How do I do that?

Re: Exclude shortdesc from PDF

Posted: Wed Mar 02, 2022 2:49 pm
by Radu
Hi,
But wouldn't the same problem be also for the HTML based output right?
Maybe your problem is more about how the content is written, if you do not want short descriptions why are you adding them, and if they resemble the paragraphs after them maybe they should be written differently. One problem could be that if you decide to filter out all shortdescriptions, maybe for a certain number of topics you will lose information if in their case the short description does not duplicate the paragraph after it.

Found some articles about short descriptions:
https://www.oasis-open.org/committees/d ... ptions.pdf
https://www.oxygenxml.com/dita/stylegui ... tions.html

Regards,
Radu

Re: Exclude shortdesc from PDF

Posted: Wed Mar 02, 2022 3:05 pm
by AudreyChr
Hi Radu,
No, I wanted the shortdesc in the html output - because it adds value there (telling users before they click on a link what the topic covers) but it's redundant in the PDF. As you say, if I didn't want them anywhere, I wouldn't have written them. But then, PDFs tend to be read as a linear document where as websites are not.

I think I've figured it out now - I need to create a completely different css file for the PDF output and set the shortdesc style to display:none.

In retrospect, the information I really would have needed from the start was an end-to-end example of how to pull together all the different bits for styling:

1. Select a standard template from the HTML transformation scenarios as a starting point. Save it.
2. Open the transformation folder in explorer.
a. Unzip the new transformation zip file.
b. Make a copy of the css file and rename the css file from whatever it is to "styles.css" (otherwise the Oxygen Style bucket won't allow you to upload it)
c. re-zip the folder.
d. upload & edit via style bucket.
e. download and add back into the publishing folder.
f. compare the original css to the modified one & combine as required.
3. Copy the transformation for the PDF and repeat process of customization.

I had the impression that I could use the same CSS file for both outputs but that does not seem to be possible.

Re: Exclude shortdesc from PDF

Posted: Wed Mar 02, 2022 3:13 pm
by Radu
Hi,

You can use a common CSS which has @media print sections containing the selectors only applying to the PDF output:

https://www.oxygenxml.com/doc/ug-chemis ... rules.html

We also have a webinar today about using CSS to style the PDF output:
https://www.oxygenxml.com/events/2022/w ... art_2.html

The first part of the webinar is available already as a recording:
https://www.oxygenxml.com/events/2021/w ... art_1.html

Regards,
Radu

Re: Exclude shortdesc from PDF

Posted: Wed Mar 02, 2022 4:00 pm
by AudreyChr
Yep - attended the first part and signed up for the second part of the webinar! That's great content!
I think I will keep the two CSS files separate for now.

Thanks Radu!