Symptom
Background image does not appear when viewing a customized Certificate of Completion as a PDF
Environment
SAP SuccessFactors Learning
Reproducing the Issue
- Create a new Certificate of Completion template and add a background image to it. Details for this can be found in KBS 2343166
- Once it is created click the preview button to see the new certificate and the background image that it has
- While viewing the preview, there is also an option to view the preview as a PDF
- Even if the background image appeared successfully in the regular preview, it may not appear in the PDF preview
Cause
The PDF is generated using PD4ML and some html tags and css attributes are not supported by PD4ML
Also the page will be size A4 so the image must be scaled to fit this. An A4 size is 595 pixels by 842 pixels.
Resolution
Follow the PD4ML guidelines, details can be found at:
Scale the background image using scale-x and scale-y for the PD and make sure the size of the image is no more than 595 pixels by 842 pixels.
Below is an example of a content wrapper div that will display a background image in both the web browser and PDF in landscape
div#content-wrapper {
background-repeat: no-repeat;
background-size: cover;
background-repeat: scale-x;
background-repeat: scale-y;
width: 842px;
height: 595px;
background-image: url(<MY_IMAGE/>);
}
Note: SAP Support does not provide assistance or validation that a customized report fits the above specifications.
Keywords
PDF, PD4ML, scale, background-image, background-cover, background-repeat, scale-x, scale-y, template, HTML, CSS, LMS , KBA , LOD-SF-LMS-CRI , Custom Report Issues , LOD-SF-LMS-REP , Reporting Data , Problem