how can i add foreach json into PDF

I have a company contract, and I have data for many households including name, phone number, and age. When I click on one of them (household data), a JSON will be added to the contract PDF. It’s like a digital contract (which can be printed for convenience) without the need for paper storage, which can be costly. I have searched many forums and GPT chats but haven’t found a solution. Do you know of any libraries that support adding text to images at specific locations and can be printed? Please help me, thank you.