PDF file with multiple names
-
Hello
How are you, my dear friend?
I have a simple problemI have a certificate design for students and I uploaded it to e2pdf and then linked it to the forminator form
What is required is how to enter a specific number of student names, for example 5 students, and create a PDF file for each student separately.
Meaning, 5 certificates are generated for each student in one PDF file
I hope the idea is clear to you
-
Hello,
If we understood correctly you need to create a SINGLE PDF file that will have multiple pages (each page per user). If so, you can try the following solution:- Use group field inside Forminator Form
- Inside PDF create multiple pages and use inner group fields shortcodes to output separate data: https://e2pdf.com/docs/extensions/forminator-forms#group-field
{text-1:1}, {text-1:2}, {text-2:3}, etc. - To hide empty pages, it can be used “Actions” and “Conditions”: https://prnt.sc/0eoZLfJetP1p
Thanks for the quick response
I need to enter the group of names into a multi-line field, and upon review, a PDF file is generated for me containing the number of names added
For example, I need to enter the names of students in a multi-line field and it will generate a certificate for each student from the same single PDF file
If under multi-line field you mean “textarea”, the pattern will be the same, except instead of {text-1:1}, {text-1:2} it must be used:
[e2pdf-format-output explode="\r\n" filter="trim" output="{0}"]{textarea-1}[/e2pdf-format-output][e2pdf-format-output explode="\r\n" filter="trim" output="{1}"]{textarea-1}[/e2pdf-format-output][e2pdf-format-output explode="\r\n" filter="trim" output="{2}"]{textarea-1}[/e2pdf-format-output]and so on.
Keep attention that this is the solution to generate a SINGLE PDF file as described in your task: Meaning, 5 certificates are generated for each student in one PDF file
Dear brother
Thanks for your interestI would like to explain what is required better
I need when filling out one form and there are multiple student name fields
For example, I write the names of 10 students, each student on a line
When you click on a specific button to generate a PDF file
The template file is duplicated over the number of students
So he takes each name and puts it on a page (testimony).When the file is downloaded, a single PDF file is downloaded containing the students’ certificates according to the number of students written in the multi-line field
Thank you for your cooperation
The solution above is exactly for this. E2Pdf can’t automatically duplicate pages with different data, so the only solution is to create multiple pages of PDF, fill them with different data, and hide empty pages via “Actions” and “Conditions”. If it will be “textarea” where you fill up each student’s name with a new line then:
The code below will output 1st student’s name:
[e2pdf-format-output explode="\r\n" filter="trim" output="{0}"]{textarea-1}[/e2pdf-format-output]This code will output 2nd student’s name:
[e2pdf-format-output explode="\r\n" filter="trim" output="{1}"]{textarea-1}[/e2pdf-format-output]and so on.
Thank you very much.
Can you explain the method step by step and where to put these codes?
Thank you for your kind cooperation
- To hide empty pages, it can be used “Actions” and “Conditions”: https://prnt.sc/0eoZLfJetP1p
Intead of {text-1:1}, {text-1:2}, {text-1:3}… you need to use the shortcodes above with [e2pdf-format-output]
Watch this example
https://my-card.one/certs/Example/Watch this example
When I add multiple names
And click Download, a set of certificates is created for each studentThis is what I need
-
This reply was modified 2 years ago by
1405alisaife.
That’s exactly what was described to accomplish the task. Step by step guide for 2 first pages:
- https://prnt.sc/-KEHjAA8cWTU
- https://prnt.sc/KBxp5sJgSpdM
- https://prnt.sc/wewdxIlRFozB
You will need to create more pages depending on how many names can be entered, and each page must contain modified [e2pdf-format-output] shortcode in part of output=”{0}”, output=”{1}”, output=”{2}”, as it explodes lines in textarea one by one.
Why is there no solution without adding pages, and relying only on the number of names? Based on the number of names, pages are generated automatically.
E2Pdf is primarily designed for exporting single entry data. Perhaps in the future, we will add a more user-friendly method for creating such PDFs.
The topic ‘PDF file with multiple names’ is closed to new replies.