The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Inserting a logo into a header using Stylesheet - getting HTTP Status 500 error

Beth Wadds
April 13, 2023

Hi, 

I've been trying to insert a logo into a header using the PDF stylesheet. 

I've looked at:

https://community.atlassian.com/t5/Confluence-questions/Insert-logo-for-PDF-export-header/qaq-p/1996630  

and 

https://community.atlassian.com/t5/Confluence-questions/How-to-insert-image-in-header-for-exporting-to-PDF/qaq-p/949260

and modified the path with my own image location. 

No matter what I try, when I click Save, I receive a HTTP Status 500 - Internal Server Error 

Here's what I enter on the PDF stylesheet:

@page
{
margin-top: 2.54cm;
margin-bottom: 2.54cm;
margin-left: 1.27cm;
margin-right: 1.27cm;

@Top-left
{
background-image: url('/download/attachments/622690402/candella_logo_desktop_1.png');
background-size: 250px 86px;
background-repeat: no-repeat;
background-position: left center;
height: 86px;
width: 250px;
}
}

 

This is a sample of what I receive when I click Save:

Type Exception Report

Message java.lang.IllegalArgumentException: Host name may not be null

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

java.lang.RuntimeException: java.lang.IllegalArgumentException: Host name may not be null
	com.atlassian.confluence.extra.flyingpdf.config.ConfigurePdfExportAction.ssrfCheck(ConfigurePdfExportAction.java:169)
	com.atlassian.confluence.extra.flyingpdf.config.ConfigurePdfExportAction.doEdit(ConfigurePdfExportAction.java:283)
	java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.base/java.lang.reflect.Method.invoke(Method.java:568)

 

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Alex Koxaras -Relational-
Community Champion
April 16, 2023

Hi @Beth Wadds and welcome to the community,

If you try with the full url, what response are you getting?

Beth Wadds
April 16, 2023

Thank you, changing the image line to the following worked.

background-image: url('https://candella.atlassian.net/wiki/download/attachments/622690402/candella_logo_desktop_1.png');

Thank you very very much! 

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events