pdfme / pdfme

A TypeScript based PDF generator library, made with React.
https://pdfme.com
MIT License
2.16k stars 192 forks source link

Feature Request - Ability to generate tables on a pdf template #473

Open mcornielje090404 opened 3 weeks ago

mcornielje090404 commented 3 weeks ago

Is your feature request related to a problem? Please describe.

I am unable to generate tables within a pdf template. This is very limiting as I need to be able to generate these PDF's based on a previously made template and just slap the dynamic data on top.

Describe the solution you'd like

Currently it requires an object of

{
  width: number;
  height: number;
  padding: [number, number, number, number]
}

A possible solution could be to append

{
  file?: ArrayBuffer | UInt8Array etc.
}

to the basePdf object requiring padding, width, and height (ideally the width and height could be automatically determined if a file is added?).

I was wondering if there was a reason this wasn't previously implemented as it seems like a core aspect of the package to be able to insert templates and add dynamic data to them.

Describe alternatives you've considered

An alternative could be to put the width, height, and padding of a pdf into an options object within the generate function/designer function etc.

Additional context

No response