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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Keeping images with previous in PDF exports Edited

Hi,

When I export my space to PDF in Confluence Cloud, my images do not always fit on the same page as the content before them, and so are exported onto the following page as the first item. 

I want the paragraph immediately before the image to always be on the same page as the image.

I've tried to set this up in the PDF Stylesheet, but to no avail.

I have tried the following (both with and without `!important`):

.confluence-embedded-file-wrapper {
page-break-before: avoid !important;
}

and

.confluence-embedded-image {
page-break-before: avoid !important;
}

However, neither work.

Is this not supported? Or am I doing something wrong?

Any guidance is much appreciated.

 

Cheers,

 

Tom

1 answer

0 votes
Diego Atlassian Team Jul 15, 2019

Hello there Tom!

Using only CSS styling I believe that this is not achievable. However, we can manually insert a Page Break by using the following User Macro:

## @noparams
<div style="page-break-before:always;"></div>

To create a user macro, we can do the following:

  1. Click the Cog Icon at the top right cornet
  2. Select General Configuration
  3. Search for User Macros in the left side menu
  4. Click to Create a User Macro
  5. Under Macro Name type page-break
  6. Under Visibility select "Visible to all users in the Macro Browser"
  7. Under Macro Title type Pagebreak
  8. You can leave Description, Categories, Icon URL, Documentation URL all as is
  9. Under Macro Body Processing select No macro body
  10. Under the Template text box, paste the code in the excerpt above
  11. Save

After we create this macro, all we need to do is insert it before the paragraph that precedes the image and it should appear in the same page as the image.

Let us hear from you Tom. Looking forward to your reply!

I was under the impression you couldn't create your own macros in Confluence Cloud. I can't see a cog icon in the top right-hand corner. The cog icon (Settings) in the left-hand sidebar does have a General Configuration option, but this has no option for User Macros.

If you could let me know exactly how to find this page, that would be helpful, although it sounds like a lot of effort to set the macro in the middle of an ordered list for several images...

Thanks

Diego Atlassian Team Aug 21, 2019

Hello there, thanks for keeping the thread moving.

You are correct, Tom. User macros are only available for Confluence server.

According to our documentation, this is not possible in Confluence Cloud:

Here we can have a better look at the differences between Cloud and Server:

Looking through our reports, I could find this:

This report points directly to the feature needed in your case. You can vote and watch this report. Votes increase the report visibility and watching keeps you up to date.

Let us hear from you, Tom!

 

Created: 19-Jul-2012 3h49 PM

You'll forgive me for not believing that Confluence have any inclination to add this feature, and that as for watching it, I might as well watch paint dry.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Confluence

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...

480 views 24 9
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you