Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do you left align images that are inside lists in PDF exports?

chris.javier January 19, 2023

I'm stuck with this problem where in Confluence pages the images look fine but when exported in PDFs the images are centered.

I tried to add css by targeting `ol img` but that doesn't seem to work.

One thing to note is that the ability to align images are not available when images are inside lists.

2 answers

0 votes
chris.javier January 19, 2023

If anyone is new to working on CSS overrides on PDF exports, going to View Source of the page really helps you understand the html markup and you should have a good starting point as to which elements and classes to target. And yes, it looks like the View Source page is exactly what gets translated / exported to PDF.

Screenshot 2023-01-19 at 6.57.20 PM.png

Ps. Just thought to put this out here.

0 votes
Dave Mathijs
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 19, 2023

Hi @chris.javier welcome to the Atlassian Community!

For this question, I'm referring to the following documentation article: Customize exports to PDF

I don't believe Confluence natively allows you to determine the alignment of images in a PDF export. However, a third-party app like Scroll PDF Exporter for Confluence may meet your requirement, to be confirmed.

chris.javier January 19, 2023

Thanks @Dave Mathijs

Actually, I figured this overrides the auto center alignment.

.wiki-content .image-center {
margin-left: 0;
margin-right: 0;
}
Dave Mathijs
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 19, 2023

So it is possible after after all?

chris.javier January 19, 2023

Yes, @Dave Mathijs!


Like Dave Mathijs likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events