• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

RH14.0.9 NewUI pdf output, cannot change distance between TOC lines

Contributor ,
Nov 12, 2019 Nov 12, 2019

Copy link to clipboard

Copied

I'm trying to change the line distance between TOC lines with the pdf.css. There's no way I have found to adjust this.

I have put the following into every single pdf-toc style, to no avail. The line distance stays about half a line. 

{margin-top: 0;
margin-bottom: 0;
border-top: 0;
border-bottom: 0;
padding-top:0;
padding-bottom:0;}

 

If I set everything to 100pt, the distance still is half a line. Putting other colors in etc. works just fine, so I am using the correct styles, it seems. 

 

I'm not using any other CSS as far as I know of. I have unchecked the default.css everywhere. Is there anything else that determines the line distance for TOC lines in the PDF output?

TOPICS
New UI

Views

377

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Nov 13, 2019 Nov 13, 2019

Adobe have come back to me with this information.

 

For the line spacing between TOC Items:

  • * To do it for all levels:

    p.pdf-toc {

    line-height: 1.0;

}

  • * To do it for a particular level:

p.pdf-toc-level1 {

    line-height: 1.0;

}

    The default value is 2.0 for line-height of each TOC item.

 

About PDF Box Model:

I am not sure if there is something similar being used as reference with respect to HTML Box Model. However, as the user figured it out, header grows upwards and footer downwards

...

Votes

Translate

Translate
Community Expert ,
Nov 12, 2019 Nov 12, 2019

Copy link to clipboard

Copied

Please paste here a style that you edited to get a colour to apply.


www.grainge.org

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 12, 2019 Nov 12, 2019

Copy link to clipboard

Copied

After careful testing, I have found the css styles to affect (the color of) the following:

 

p.pdf-toc      <- the whole TOC line
a.pdf-toc-link   <- just the text at the left hand side (this isn't affected by the p color, needs to be set here)

a.pdf-toc-link:after   <- the dots (this one is affected by the p color, but can be overridden here)
span.pdf-toc-page-no    <- the page number (this one is also affected by the p color)

 

The -level1 and -level2 variants (etc.) override the global settings above for the specific levels they point at. And just those levels, not the levels below them as well.

 

Is there a document or page that describes all these styles? They are kind of descriptive but it still takes a lot of trial and error to find out what these styles really mean (I didn't guess for example that the after style meant the dots).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 12, 2019 Nov 12, 2019

Copy link to clipboard

Copied

I am seeing the same. I'll see if I can find out more.

 

There isn't any documentation about the various style definitions that I have seen.


www.grainge.org

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 13, 2019 Nov 13, 2019

Copy link to clipboard

Copied

Adobe have come back to me with this information.

 

For the line spacing between TOC Items:

  • * To do it for all levels:

    p.pdf-toc {

    line-height: 1.0;

}

  • * To do it for a particular level:

p.pdf-toc-level1 {

    line-height: 1.0;

}

    The default value is 2.0 for line-height of each TOC item.

 

About PDF Box Model:

I am not sure if there is something similar being used as reference with respect to HTML Box Model. However, as the user figured it out, header grows upwards and footer downwards.

To fit the header in page or align things from header, Margin settings in PDF Preset > PDF section can be changed.

 

You can also refer to all the .ejs template files being used for PDF Output in “C:\Program Files\Adobe\Adobe RoboHelp 2019\resources\data\pdf” folder.

For example, toc.xsl.ejs file contains default styling information for TOC Items.

****************************************

Hope that helps.


www.grainge.org

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 14, 2019 Nov 14, 2019

Copy link to clipboard

Copied

Yes, that works!

 

Still not sure why they chose to completely ignore the margin settings for the TOC, because now I can only change the distance evenly-spaced, while I would like to have toc1 with more space above and less space below, to emphasize that is belongs to the block below it and not the block above it.

 

Maybe in a future upgrade. But for now this will (have to) do 🙂

 

Thanks Peter for your effort!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 14, 2019 Nov 14, 2019

Copy link to clipboard

Copied

For things that are broken or need further functionality, submit a request. Please follow this link to report bugs or request features. https://tracker.adobe.com

 

Post the link to your bug report / feature request in this thread and others can vote for it. The more people who do so, the higher it gets prioritised.


www.grainge.org

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 19, 2019 Nov 19, 2019

Copy link to clipboard

Copied

I initially tried to report it as bug, but the system didn't let me. So here it is as a feature request:

 

https://tracker.adobe.com/#/view/RH-5923

 

I'm not a JavaScript expert 🙂 But I have looked at the ejs file and can indeed not find anything resembling a margin setting. So for now I conclude the margin is ignored for toc lines.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 19, 2019 Nov 19, 2019

Copy link to clipboard

Copied

LATEST

A method I used in Classic was to set the TOC style in my Word template to achieve what I wanted. I haven't tested that in 2019 but it might be worth a try with any further issues that crop up.


www.grainge.org

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp