I have a relatively wide table that displays fine in Confluence and in an HTML export. However, when I export to PDF, serveral columns get cutoff. There is no horizonatal scroll bar; when I widen the window, the text grows in size.
I am using Confluence on-demand. Are there any workarounds or configuration settings I can make?
I guess I'll have to get an on-premise instance; there are too many things for which I need plug-ins that only work on-premise.
I had a second look at the topic.
There are in fact different CSS styles that determine the appearance of tables. Depending on how these styles are defined in the standard CSS stylesheet (the one that comes with Confluence) the exported PDF will look different, in some cases tables will break correctly, in some cases not.
To make it work for you, you have to redefine these styles, that is, overwrite the styles from the standard CSS stylesheet with your own.
To do this, do the following:
table {
word-wrap: break-word; /* try normal or break-word or initial or inherit */
table-layout: fixed; /* try auto or fixed */
}
In my Confluence version "fixed" does break the table correctly, "auto" does not.
The settings for "word-wrap" do not make much of a difference in this case, but "break-word" seems to make the most sense, so I used it, just in case.
Result for "table-layout: fixed"
Result for "table-layout: auto"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
https://jira.atlassian.com/browse/CONFCLOUD-34390
See comment by Tom Simm
... menu, View Source
Then use your browser's print menu to save it as a PDF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for explaining. I just couldn't understand the original sentence "Click View Source and the Print to PDF".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Problem I have is that however small table I make, Confluence expands it and cuts off last column regardless. This happens even if I set Fixed width instead of Responsive. There is literary no way for me to export the document except making screenshots of my browser and then creating document in another software composed of those images. I don't find that very productive.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Robert,
we've a page in our documentation regarding the handling of wide tables: https://www.k15t.com/display/PDF/How+Can+I+Deal+with+Wide+Tables
Altough this docs are written for our Scroll PDF Exporter which isn't available for OnDemand yet (https://jira.atlassian.com/browse/AOD-4869), you could try the mentioned workaround (similar to Steffen's tipps), but maybe a bit more detailed.
Cheers,
Nils
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
when the table is too wide for the PDF, it gets cut off. How it looks in HTML and PDF is often different.
All you can do, is try to make the table smaller:
In other words:
No workaround! Just the possibility for small adjustments.
What is possible with on-demand, I don't know: Probably you can't do anything that requires access to the PDF export stylesheet (that would be 3 and perhaps 2).
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.
Because I was having fun with this, here is another example that illustrates the difference between "table-layout: fixed" and "table-layout: auto".
This is how the Confluence page looks like
Table cells have different widths because the width is adjusted to the content of the cell. Long words do NOT wrap. Because of this, the width of a cell is equal to the width of the longest word or image. If the total width of ALL the cells exceeds the page width, a scroll bar is added.
This is how the PDFs page looks like with "table-layout: fixed"
The table cells all have the same width. Long words do wrap to fit in the given space. Images are still cut off if they are too long.
This is how the PDFs page looks like with "table-layout: auto"
Table cells have different widths because the width is adjusted to the content of the cell. Long words do NOT wrap. Because of this, the width of the cells is equal to the width of the longest word or image. If the total width of ALL the cells exceeds the page width, the table is cut off.
The point is:
In the end, one has to decide which of the two table settings, "fixed" or "auto", works best for a given document
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Another work-around is to save the page as pdf by means of printing, and scale the contents to fit the table (ie. right click, print, format it to fit, save as pdf)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have Confluence change the generated PDF by adding a 'PDF Export Stylesheet'. The one below can be used:
@page
{
/*A4-sized pages in landscape orientation are 297 mm wide by 210 mm long*/
size: 297mm 210mm;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As a workaround you cant try to export to PDF with Table Filter macro.
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.