Skip to content

Different autofit behavior between simple table and flextable #552

Answered by davidgohel
gilleschapron asked this question in Q&A
Discussion options

You must be logged in to vote

Hello Gilles,

This should set real Word autofit:

myft <- set_table_properties(myft, layout = "autofit")

PS : sorry for the naming issue, it's historical...

  • autofit() set the width to the calculated width of the max paragraph length (and only \n can be used otherwise it is considered to be layout on a single row),
  • set_table_properties(layout = "autofit") dedicate the autofit work to the sofware that will be used to view the table (browser for HTML, adobe for PDF, Word for docx)

More here: https://ardata-fr.github.io/flextable-book/layout.html#tabwidth

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@davidgohel
Comment options

@gilleschapron
Comment options

@davidgohel
Comment options

@gilleschapron
Comment options

@davidgohel
Comment options

Answer selected by gilleschapron
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants