Open Akshaypmna18 opened 1 month ago
+1 Same issue
+1 have same issue, tired example from website, didn't help. However, I figured out a way to make it work here's how:
const inputs = {
//some inputs
"mytable": "[[\"Alice\",\"New York\",\"Alice is a freelance web designer and developer\"],[\"Bob\",\"Paris\",\"Bob is a freelance illustrator and graphic designer\"]]"
}
This creates a dynamically filled table for me, if you follow the docs example and make this change, you will get dynamic tables to work.
@romankolosok Unfortunately it didn't work for me. I could get rid of the previous error but now I'm receiving "Blank PDF is not supported" which is thrown by the createSingleTable
method.
@ctkc if you're using betaTable
you need margins
try
"basePdf": { "width": 210, "height": 297, "padding": [10,10,10,10] }
@lowbits Thanks for the suggestion, that works! The problem was that I had a base64 encoded string in the basePdf
because I was using a base PDF as a template. I generated it here https://playground.pdfme.com/ so it seems like the playground is not supporting tables yet.
Describe the bug
I cannot create table using pdfme
To Reproduce
Expected behavior
the error message
VM4835:1 Uncaught (in promise) SyntaxError: Unexpected token 'A', "Alice,New "... is not valid JSON at JSON.parse ()
at modifyTemplateForTable (chunk-HQ6VPE25.js?v=d5246820:104654:27)
at modifyTemplate (@pdfme_generator.js?v=1305fb5a:123:16)
at getDynamicTemplate (chunk-RT2GMJPP.js?v=d5246820:6098:34)
at generate (@pdfme_generator.js?v=1305fb5a:117:35)
at async handlePdf (pdfme.jsx:96:5)
Your Environment
Your Error Log
Additional context