Skip to main content
Inspiring
August 24, 2020
Answered

RH 2020 New UI - Creating a front cover for PDF output

  • August 24, 2020
  • 8 replies
  • 664 views

I want to create a topic in my RH 2020 project for the front cover of my pdf output. I want the background of front cover to be all one colour. However, when I do this to my topic, there is a margin round the outside that is white, and the background colour does not cover the whole of an A4 page. How do I configure my topic to do this?

This topic has been closed for replies.
Correct answer Peter Grainge

Adobe have come back with a solution that you could apply to get a full background colour for the cover page.

 

Add this rule to the CSS that will apply to the cover page. 

 

@page :-ro-nth(1 of bodyPage){

  margin: 0cm !important;   

  background-color: red;

}

 

Red can of course be changed to an RGB or Hex value.

 

8 replies

Peter Grainge
Community Expert
Community Expert
December 1, 2021

@D.Desmet The cover page in the source needs to be a topic, not a PDF. Add the topic in the Front Matter section of the TOC.

________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
Inspiring
December 1, 2021

It works with a PDF that I added to the front matter! Is the fact that PDF page can be selected for front matter and that it gets in the output a hidden or a known feature? If it is not the intention, it shouldn't be possible to select a PDF.

 

Strange that these PDFs are scaled and pushed against the top of the page. A logical default behaviour would be no scaling and the availability of settings to choose the scaling and position on the page.

 

Since I can't wait for an update of this feature (?), I will try with a topic like you say.

Inspiring
August 25, 2020

Thank you very much Peter. This worked for me. 

Peter Grainge
Community Expert
Peter GraingeCommunity ExpertCorrect answer
Community Expert
August 24, 2020

Adobe have come back with a solution that you could apply to get a full background colour for the cover page.

 

Add this rule to the CSS that will apply to the cover page. 

 

@page :-ro-nth(1 of bodyPage){

  margin: 0cm !important;   

  background-color: red;

}

 

Red can of course be changed to an RGB or Hex value.

 

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
Inspiring
December 1, 2021

Trying to get my cover page right in the PDF. The cover page is an A4 PDF and the page size of the PDF output is also A4. I saw that my cover page was scaled, so I searched for a solution and found this topic.

Unfortunately, adding the following (without the color because I don't need that) to the css that I use for topics, still scales my cover page.

@4025150 :-ro-nth(1 of bodyPage){ margin: 0cm !important; }

I already tried changing page margin to 0. This indeed changes the margin for the topic pages, but not of the cover page.

What did I miss?

Peter Grainge
Community Expert
Community Expert
August 24, 2020

Yes. Background colour in the body tag.

 

I guess another way would be a single cell table with a background that pretty much covers the page.

 

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
Inspiring
August 24, 2020

Hi again  I did not ask you how you applied that background colour? Did you had a style="backgroundcolour" to your body tag?

Peter Grainge
Community Expert
Community Expert
August 24, 2020

I have referred the cover page background applying to all pages to Adobe. You should be able to have a coloured background, albeit not the whole page.

 

Another consideration though is using some colour is fine but if anyone prints a page with a whole coloured background you are draining a lot of toner.

 

A coloured margin can look good but then you hit problems with different page sizes. A4 versus Letter.

 

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
Inspiring
August 24, 2020

Thank you for your help Peter. I see your point about the margins. I think my front cover might need a redesign. 

Peter Grainge
Community Expert
Community Expert
August 24, 2020

Please use the link to insert photos rather than attaching them. It overcomes a bug in this forum.

 

The PDF preset has a margin defined. You can set that to zero but it will apply to all pages and I doubt you want that for the topics.

 

Also I found that whilst that allowed me to set a colour for the body background that did cover the whole area, that colour was then applied to all topics even though they had their own CSS applied. I tried to get round that by using master pages but no joy.

 

I will take that up with Adobe as it seems like a bug.

 

Bear in mind that whilst both PDF and Word outputs can be viewed online, they are intended to be printed so they must have a margin as few printers will print to the edge of the paper.

 

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.