Hello!
I have a task to automatically fill in certain data on a postcard.
Right now I have a table with the following fields:
- postcard type (determines which template to apply, this will be a jpg or pdf file that I have on my Google Drive)
- 4 parameters that I write on the postcard (for example, name, address, phone, etc., these data will be taken from the table where the script should be)
- placement parameters for each of the parameters (in pixels relative to 0)
- use of a specific font Marck Script (can be statically written in the script)
- font size
- output file name
Here’s how I see it:
I have a folder with templates, for example 1.jpeg, 2.jpeg, 3.jpeg ... each template has an ID written either in the script or in the table for further work with it.
I have a script that runs from the table or from scripts (it doesn't matter, because later it will need to be modernized and integrated into the finished process)
The script looks at certain cells and "takes" the input parameters
It takes a certain template, copies it, then overlays the text with the parameters, applying a specific font, size, and position. And there should be several texts embedded (currently 4 is enough or looping through the table)
The finished file is renamed. Further simple actions like getting a URL and providing a download link can be skipped, but that’s just for checking purposes.
The postcard will later be sent to the printing house, so it needs to be made "to size" with the template, or additionally to the parameters, make an input for sizes.
It is assumed that the template itself will be redrawn, and the data will come from the form, so the process needs to be maximally automated, with no unnecessary windows, no additional "do you agree" prompts, and at most, display for verification at the moment of saving.
I was doing it through the Canva API, but there is a problem with connecting the font.
Maybe someone can bypass this or suggest another approach.