-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
None
-
Affects Version/s: 10.2.14, 10.2.18
-
Component/s: Page - Export / Import, Space - Export / Import
-
None
-
2
-
Severity 3 - Minor
-
22
Issue Summary
Images referenced by relative attachment URLs in a custom PDF stylesheet are not rendered in Confluence Data Center 10.2.14.
Example relative URL:
background-image: url('/download/attachments/<content-id>/<filename>');
The equivalent absolute URL renders correctly:
background-image: url('https://<base-url>/download/attachments/<content-id>/<filename>');
A data-URL also renders correctly.
Steps to Reproduce
- Create a Confluence space and page.
- Attach a valid PNG file named pdf-test.png to the page.
- Record the attachment download URL.
- Configure this minimal space PDF stylesheet (replace URL with real attachment):
body {
padding-top: 150px;
color: #ff0000 !important;
font-size: 24px !important;
background-image:
url('/download/attachments/<content-id>/pdf-test.png');
background-repeat: no-repeat;
background-position: left top;
}
6. Perform a space PDF export or PDF export a single page in that space
Expected Results
The root-relative attachment URL should resolve to the same Confluence attachment as the equivalent same-base absolute URL.
Both of these forms should render the image:
url('/download/attachments/<content-id>/pdf-test.png')` url('https://<base-url>/download/attachments/<content-id>/pdf-test.png')
Actual Results
Only the absolute images render in exported PDF
Workaround
Use absolute URLs in PDF stylesheets