Skip to main content
Participating Frequently
November 24, 2020
Answered

How do I get a background image to display in PDF output?

  • November 24, 2020
  • 3 replies
  • 2207 views

I am trying to generate a user manual and training materials for a project. Need to generate pdf/paper output for hands on training. Company policy requires a background image and logo on the cover page. I have figured out the necessary styling to add the background image and see it in RH. I don't think I have any issues with the CSS as I can manually create an html file that displays the background image.  But when I generate the PDF output, the background disappears. Since it is a dark background and the accomanying company logo is white, the logo is now a polar bear in a snow storm with the background missing.Any suggestions would be welcome.

This topic has been closed for replies.
Correct answer SimonDonkers

I've noticed with inline CSS backgrounds only work in PDF output for topics in the root folder of the project. If the topic is not in the root folder the background only shows up in HTML, not PDF.

I've reported this and it should be resolved with update 3, https://tracker.adobe.com/#/view/RH-8344

 

If I define am external .css file with a class and use a background from there it works fine for me, also in PDF output. Make sure the background path is relative to the CSS file. As example: (I'm running 2020.2.29)

.M001 {
background-image: url(../images/ISO-7010/ISO_7010_M001.svg);
}

3 replies

Jeff_Coatsworth
Community Expert
Community Expert
November 25, 2020

As a workaround, can you edit the PDF in Acrobat to add what you're looking for post-production? 

Participating Frequently
November 25, 2020

Jeff - That is certainly an option if all else fails. 

SimonDonkersCorrect answer
Participant
November 25, 2020

I've noticed with inline CSS backgrounds only work in PDF output for topics in the root folder of the project. If the topic is not in the root folder the background only shows up in HTML, not PDF.

I've reported this and it should be resolved with update 3, https://tracker.adobe.com/#/view/RH-8344

 

If I define am external .css file with a class and use a background from there it works fine for me, also in PDF output. Make sure the background path is relative to the CSS file. As example: (I'm running 2020.2.29)

.M001 {
background-image: url(../images/ISO-7010/ISO_7010_M001.svg);
}

Participating Frequently
November 25, 2020

Thanks for the suggestion. I moved the page to the root of the project and I've tried both inline CSS and a class defined in the .css file. Made sure my relative paths are correct. In both cases, I can see the background while authoring and in a Responsive HTML 5 output, but not in PDF. I upgraded to 2020.2.29 and upgraded the project. All to no avail.I'll wait for the fix from your reported bug and hope that works. Until then, I have to move on and create my actual content.

Community Expert
November 25, 2020

Which version of Robohelp are you using?

Participating Frequently
November 25, 2020

I was running 2020.1.54. I upgraded to 2020.2.29 with no change to results.