bpampuch / pdfmake

Client/server side PDF printing in pure JavaScript
http://pdfmake.org
Other
11.64k stars 2.04k forks source link

Text full width and padding around the text #2220

Open NyoriK opened 3 years ago

NyoriK commented 3 years ago

Hi,

I have this as the current pdf file: pdf-without-padding

I would like to have some padding around the text, and also have the text cover the full width of the row/page. Like this: pdf-with-padding

This is the full code -> Gist file.

I didn't find padding options in the styles documentation. Is there any way to achieve this format?

Pelesyno commented 3 years ago

{ canvas: [{ type: 'rect', x: 0, y: 0, w: 520, h: 50, color: '#2c96d0' }] }, { text: 'START', color: '#e4ebef', alignment: 'center', margin: [0, -32, 0, 0] }, tente desse jeito ;)