I usually use the tool on the user panel to center each picture. It is more or less fine, but I have problems while pdf export. Some of the pictures a left centered. I don`t know why. Sometimes I use html command "text-align: center" for a picture, it helps but not for every picture. On the confluence page it is centered, everything is fine.
Is there any command to make all the pictures centered and have them the same after pdf exporting? Or it is possible to solve this problem using some tools?
One tool to help diagnosis the issue is the confluence-source-editor. This tool will allow you to look at the XHTML source of the page to see if the images that are not centering on PDF export are some how inserted differently than other, for example, inside div or span tags, or non-breaking spaces ahead of the image, etc.
If you see differences, but not sure what to do, you can paste the code here, both one that centers and one that does not. Then we (the community) can try to give you more guidance.
2 cases are attached below (pdf output and the source codes). On the confluence page all the pictures are centered.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I see only one way – leave empty line between text and picture and center this line. It works. Is there any other way?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
One thing that sticks out at me is that the images look like they were pasted into the Confluence page, rather than linked to either an attachment on the page or another page within Confluence. I have seen strange behavior with pasted images.
For example, this is what I would have expected to see for an image correctly inserted and centered
<p>
<ac:image ac:align="center" ac:height="436" ac:width="593">
<ri:attachment ri:filename="worddavae7a5f7d81588469b7c82fa3b8a63ce1.png"/>
</ac:image>
</p>
In the first instance, I see you have text in front of the image, followed by <br> tag before the ac::image tag -- that will cause problems. So it should appear as:
<p>a bunch of text ... (<<RESET>>)</p>
<p>
<ac:image ac:align="center">
<ri:url ri:value="...."/>
</ac:image>
</p>
The reason the second instance worked was because the parent p tag was also centered aligned.
<p style="text-align:center;">a bunch of text ... )<br>
<ac:image ac:align="center">
<ri:url ri:value="...."/>
</ac:image>
</p>
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your reply!
I`ll try to find a proper way to insert pics. Some of the pictures were imported with the document from a word file. I found pictures with the same code as you wrote, but they had the same problem with centering in pdf. I guess <p> value is a priority for pdf exporter, so pictures have the same characteristics as a text above. I started to make a new line, then insert a picture. It works. For now I see this as the only way.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If if works, please give a vote or accept the answer, please. ;-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.