yogthos / json-to-pdf

A Library for easily generating PDF documents given JSON markup
100 stars 20 forks source link

how to make multiple lines in a table cell #10

Open juanbill opened 9 years ago

juanbill commented 9 years ago

Hi:

I'm using your library to create a letter head. Playing around with table for layout, how do you make multiple lines in a cell (for example name + line break + address + line break + phone number)? I tried multiple paragraphs in the cell to make multiples with no success.

Alternatively, if I used the cells for a new lines, how do I shrink the cell spacing/padding?

Thanks Juan.

yogthos commented 9 years ago

A list would probably be the simplest solution:

[{"title":"My document"}, 
["table",
 [["cell", ["list", {"symbol": ""}, "item", "another item", "yet another item"]]
, "bar", "baz"]]]