pdfme / pdfme

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

Placeholder, Expression #439

Open hand-dot opened 2 months ago

hand-dot commented 2 months ago

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

Example image image


I don't have a concrete idea of how to realize this yet.

Perhaps a template engine like Handlebars could operate at render time? However, there is a clear need from users. This might also involve breaking changes, so it might be included in V4 depending on circumstances.

Describe the solution you'd like

Describe alternatives you've considered

Add a process to replace placeholders before calling the generate function.

Additional context

No response

peteward commented 1 month ago

https://github.com/pdfme/pdfme/pull/466 achieves this. Let me know if you were thinking of something different.

hand-dot commented 1 month ago

Let's think UI of Form mode.

Currently, your PR doesn't have Implementation for Form mode, right?

peteward commented 1 month ago

Yes, I can add one though