I have a table with more than 20 columns. This table is displayed with scrolling on a website. I have to scale these columns for a PDF export.
Is there a UI pattern that helps fitting these columns into a PDF?
User Experience Stack Exchange is a question and answer site for user experience researchers and experts. It only takes a minute to sign up.
Sign up to join this communityI have a table with more than 20 columns. This table is displayed with scrolling on a website. I have to scale these columns for a PDF export.
Is there a UI pattern that helps fitting these columns into a PDF?
Use symbols and abbreviations to lower the width of each column, and have a legend on top of the table to explain each symbol/abbreviation if necessary.
Quite hard for 20 columns. You could find another way to transfer it to a pdf depending on the rows you have. Possibly in a card view one after the other. Or you could eliminate some secondary columns in order to make it fit.
It is all a question of output size & quality.
I have one spreadsheet that I have been exporting as a PDF for years and it keeps growing. So I have one version where I drop a column at the beginning for each column I add on the end (it is time based) and another where the columns just keep getting smaller. Currently up to 18 columns - next year it will be 19 columns.
The things you can do:
PDF is based on a printable document design. If you print (US sizes) letter size, portrait and have 1" margins, then you only have 6.5" to work with. If you print legal size and landscape and 0.5" margins then you have 13" to work with - double the size. The typical user may not be able to print on legal paper, but landscape & smaller margins should not be a problem at all.
Typical font size is around 12pt. 10pt is still quite readable. But if you simply must have everything on one page, go smaller - even 8pt can work if it has to.
Depending on the document, you may have some columns where you can replace a full word or two with a number or short code and make the column smaller, but at the expense of having a legend somewhere to explain the codes.
If every column must be shown at the same time then try transposing the table and adding a scrolling feature to view the records.
"Shifting Columns and Transposing Data" is an interactive PDF document which includes a custom scrolling feature and available at https://www.academia.edu/43005344/Shifting_Columns_and_Transposing_Data_A_Reply_to_A_Question_at_User_Experience_Stack_Exchange.
It implements the idea as a PDF form application that uses JavaScript and the Acrobat/JavaScript API.