Copy link to clipboard
Copied
Using RH 2020 is there a way to add page numbers to the generated pdf?
Is that what the master page does?
Is there a way to apply my styles to the pdf? Specifically, all images have a line around them on the help pages but not in the pdf.
Copy link to clipboard
Copied
________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information
Copy link to clipboard
Copied
The lines are applied through a css file.
Copy link to clipboard
Copied
Yay I have page numbers now!
Copy link to clipboard
Copied
I just created a new img style using the supplied CSS editor. I did it through the UI editor but this is the source code.
img.border {
border-width: 6px;
border-style: solid;
border-color: #FF0000;
border-left-width: 6px;
border-left-style: solid;
border-left-color: #FF0000;
border-top-width: 6px;
border-top-style: solid;
border-top-color: #FF0000;
border-right-width: 6px;
border-right-style: solid;
border-right-color: #FF0000;
border-bottom-width: 6px;
border-bottom-style: solid;
border-bottom-color: #FF0000;
}
Applied it to an image and the border appeared in a PDF.
________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information
Copy link to clipboard
Copied
Thanks I'll give it a try!
Copy link to clipboard
Copied
This might not be a question for you....but here are my results.
This is what I have in my css
img {
border: 1px solid #D2D7D9;
height: auto;
max-width: 100%;
}
If I change it to follow your format then I don't get a line around my image at all in RH. I am still playing with it, I imagine it may be a syntax error?
Copy link to clipboard
Copied
That's because Peter's CSS will apply only to images that have a class "border" assigned.
That is, his definition:
img.border {
/* definitons */
}
will only apply to these images:
<img src="path/to/your/image.png" class="border"/>
but not to these:
<img src="path/to/your/image.png"/>
Your CSS:
img {
/* definitons */
}
will apply to ALL (each and every) image - with our without a class:
<img src="path/to/your/image.png" />
<img src="path/to/your/image.png" class="border"/>
<img src="path/to/your/image.png" class="noborder"/>
I strongly recommend to follow Peter's approach and give all images of the specific type a dedicated class, and define the css only for this class. The shorthand form you used is absolutely fine. Combined it would be like this:
HTML:
<img src="path/to/your/image.png" class="border"/>
CSS:
img.border {
border: 1px solid #D2D7D9;
height: auto;
max-width: 100%;
}
Copy link to clipboard
Copied
Thanks that fixed my problem.
But I did have to fiddle with the style sheet of the master page that I had applied to the pdf.
First I updated the main css file and when I produced the PDF the images had a big red border.
The style sheet of the master document I created for the PDF had that red border in it ( I guess by default)
The main style sheet and the style sheet from the master document seem to work together. After some trial and error, it is now working.
Thank you both for your help.
Mary Ann
Mary Ann