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 have come back to me with this information.
For the line spacing between TOC Items:
line-height: 1.0;
}
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
...Copy link to clipboard
Copied
Please paste here a style that you edited to get a colour to apply.
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).
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.
Copy link to clipboard
Copied
Adobe have come back to me with this information.
For the line spacing between TOC Items:
line-height: 1.0;
}
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.
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!
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.
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.
Copy link to clipboard
Copied
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.