PDF export:
Images that doesn t fit on the same page after any element (headline, paragraph... ) always starts on a new page.
Can I avoid this?
Based on this documentation:
https://confluence.atlassian.com/display/DOC/Customising+Exports+to+PDF
You will need to modify the attributes for the image elements, e.g.
img { page-break-inside: avoid; -fs-fit-images-to-width: 6in; }
set page-break-inside to auto. (A value of avoid instructs the browser to start the element on the following page if there is not enough room for it on the current page)
Additional references: http://msdn.microsoft.com/en-us/library/ie/cc304067(v=vs.85).aspx
If that don't work, maybe you can apply some form of CSS (im not very good at css, you gotta find a solution yourself) that constrains the size of the image to its parent element. (so it doesn't overflow and do a page break)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This solution does not work.. Is there any other solution available to resolve this issue?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Anselmo: Better control for page breaks
In CSS you can use selectors to define elements more specifically. At http://www.w3.org/TR/CSS2/selector.html#adjacent-selectors you find an example:
E + F -> Matches any F element immediately preceded by a sibling element E.
So if you want to avoid page breaks between headlines and images you can use something like:
h1+img { page-break-before: avoid; }
But beware, it is not that simple. Always check the real html code because sometimes the image itself is inside another <div>, <p> or <table> and doesn't follow the headline directly or there is an unrecognized empty paragraph after the headline and so on...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, Steffen,
this is at least worth a try and may be useful in the majority of cases. I could explain all other phenomena and ask editors to handle their code adequately.
An even better solution, which analyses a preview completely to improve its look and feel may be used within Acrobat, although it is additional effort.
My special interest is a wiki wiki way of exporting pdf in an idiot-safe manner, because it's not only me being told to do it. I'm just a good test candidate as an idiot :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas,
Hi Atlassians,
I face a related problem in pdf-export. We often have page breaks between headlines and pictures belonging to this headline. There is no setting implemented so far, that standard text and pictures may break, but headlines and the following paragraph or picture not. This would hopefully lead to a page break before the headline and keep content together, which belongs together just by definition of the previous paragraph's format.
Another help to reduce the number of bad looking page breaks could be the choice between portrait or landscape pdf-export. If your article deals with many screenshots and little text (easy to translate!), a landscape format uses the page space much more efficiently and keeps most screenshots easy to read (bigger).
Many users still love to put printed documentation rather on shelves than reading it online. So making better use of page space is an ecological point too.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas,
I took the liberty to raise a feature request for you, about this problem, as you can see here:
https://jira.atlassian.com/browse/CONF-27654
I did a test in my local environment and I was able to reproduce the same behavior that you're facing there.
I would strongly suggest that you vote on this feature request to increase its popularity and add it to your watchlist for future updates.
Cheers,
WZ
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.