Center captions when exporting to PDF
Asked by dan_pse:

How can I get captions to be centered when I export my space to a PDF? I have configured the horizontal alignment in the caption editor, and it looks correct in Confluence, but when I export to PDF, the captions show up left aligned.


Answers:
author: Hana Ku?erov?
body: Hi [@dan_pse](/t5/user/viewprofilepage/user-id/1190951) ,

have you seen this page about [customizing exports to PDF](https://confluence.atlassian.com/doc/customize-exports-to-pdf-190480945.html)? I'm not sure what exactly you mean by caption, but hopefully the page gives you needed information.

comments: author: dan_pse
body: Hi [@Hana Ku?erov?](/t5/user/viewprofilepage/user-id/1226304) ,

Thanks for your reply. I did look at customizing exports, but I don't know what CSS element, class, etc. to override for captions. The documentation is very incomplete.  

Here's an example of what I'm seeing:

![2021-08-06 12_42_30-PSE-060821-1939-176.pdf - Brave.png](https://community.atlassian.com/t5/image/serverpage/image-id/155013iE577A7184033689F/image-size/large?v=v2&px=999 "2021-08-06 12_42_30-PSE-060821-1939-176.pdf - Brave.png")I want the caption above the table (Table 1. Vivid Colors) to be horizontally centered, not left aligned.

The caption appears centered when I view it in Confluence, but not when I export it to a PDF.

Here's a look at the caption configuration dialog:

![2021-08-06 12_50_52-Color - PSE - Confluence - Brave.png](https://community.atlassian.com/t5/image/serverpage/image-id/155015i96D0D9B4420D7833/image-size/large?v=v2&px=999 "2021-08-06 12_50_52-Color - PSE - Confluence - Brave.png")

So, the problem may be with the Numbered Captions app, not Confluence itself. I'm trying to get more information on that app from my system admin.


author: Hana Ku?erov?
body: Hi [@dan_pse](/t5/user/viewprofilepage/user-id/1190951) ,

thank you for the provided info. So, you are using [this app](https://marketplace.atlassian.com/apps/1211217/numbered-captions?tab=overview&hosting=server), right?

I tried to install it, but there are some problems with my.atlassian.com, so I'm not able to get the trial license. I will try it later again, but it is not possible to continue with the investigation right now :-(.

Maybe you can also try to contact the vendor of the app, if they can provide you with the info, which changes need to be done.


author: Deepak Sharma
body: Hi [@Hana Ku?erov?](/t5/user/viewprofilepage/user-id/1226304) ,

I am observing the same issue with Page Export as well. I tried "Export to PDF" and "Export to Word", and the contents in both the exported documents are always left-aligned irrespective of how the page is looking.

I see this behavior not only for [this app](https://marketplace.atlassian.com/apps/1211217/numbered-captions?tab=overview&hosting=server) but for other apps as well. e.g I tried LatexMath and for that also the exported document is left-aligned.

What is the default behavior of export(PDF and Word)? Does the exported document have the same look and feel and alignment as that of the Confluence page? Could it be some issue with the export functionality?

Example screenshots

Actual Page NC

![Screenshot 2023-01-06 at 1.45.57 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/233286iAC9B46130DF3F4F0/image-size/large?v=v2&px=999 "Screenshot 2023-01-06 at 1.45.57 PM.png")

Exported to PDF

![Screenshot 2023-01-06 at 1.47.28 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/233285iE795928940867560/image-size/large?v=v2&px=999 "Screenshot 2023-01-06 at 1.47.28 PM.png")

Exported to Word

![Screenshot 2023-01-06 at 1.50.10 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/233284i8940258D3FB7EF03/image-size/large?v=v2&px=999 "Screenshot 2023-01-06 at 1.50.10 PM.png")

Actual Page Latex

![Screenshot 2023-01-06 at 2.03.26 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/233287iDEC5427D196F80BE/image-size/large?v=v2&px=999 "Screenshot 2023-01-06 at 2.03.26 PM.png")

Exported to PDF

![Screenshot 2023-01-06 at 1.50.30 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/233282iF69413527DE5D3D1/image-size/large?v=v2&px=999 "Screenshot 2023-01-06 at 1.50.30 PM.png")

Thanks

Deepak


Tags: confluence-server

server