Closed abdul41265 closed 5 months ago
What do you mean by dynamic data?
There is a sample in the documentation for using it: https://jikji.xyz/docs/inject-json-data
Is this approach possible to transmit data from the server to the client side?
The JSON data only works when you use SSG, so there is no client. If you want to fetch the data on the client side, you need to use a normal JS/React approach, for instance, check this example: QuoteFromAPI.tsx
Is it possible to save a PDF file on the client side similar to how it's done in SSG by specifying a path?
Please create a new issue if your question is unrelated to the original issue. I think you can find your answer in the documentation https://jikji.xyz/docs/csr-vs-ssg basically, your only option is calling window.print()
Feel free to reopen the issue if you still have any questions
Can we send dynamic data like this? And how do we access it on the front end?
const jsonData: any = { title: "Test injection đ", table: [ { index: 1, caption: "data" }, { index: 2, caption: "more data" }, ], };
await ReportBuilder.browser(browser) .serve("./build") .report("new_report") .jsonData(jsonData) .pdf({ path: 'out.pdf' }) .build();