Highlighted

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

Participant ,
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?

Adobe Community Professional
Correct answer by Peter Grainge | Adobe Community Professional

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

Topics

New UI, Single source layouts

Views

161

Likes

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

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

Participant ,
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?

Adobe Community Professional
Correct answer by Peter Grainge | Adobe Community Professional

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

Topics

New UI, Single source layouts

Views

162

Likes

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
Adobe Community Professional ,
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

www.grainge.org for free RoboHelp & Authoring info. Use the blue Reply button at the top to help me help you.
The black Reply link nests replies and they sort out of order.

Likes

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
Reply
Loading...
Participant ,
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).

Likes

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
Reply
Loading...
Adobe Community Professional ,
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

www.grainge.org for free RoboHelp & Authoring info. Use the blue Reply button at the top to help me help you.
The black Reply link nests replies and they sort out of order.

Likes

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
Reply
Loading...
Adobe Community Professional ,
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

www.grainge.org for free RoboHelp & Authoring info. Use the blue Reply button at the top to help me help you.
The black Reply link nests replies and they sort out of order.

Likes

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
Reply
Loading...
Participant ,
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!

Likes

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
Reply
Loading...