kfold3
December 9, 2025, 9:28pm
1
I was in the middle of a final exam and a thought occured to me. If I am able to provide a list of student names and IDs, can I have typst generate n PDFs such that each exam PDF has the student name and ID printed on it?
This is just a question out of curiosity.
Andrew
December 9, 2025, 10:00pm
2
Typst generates only one PDF file per typst compile. Use external scripts to split and rename pages.
opened 10:17PM - 08 Nov 25 UTC
feature request
cli
### Description
Previously mentioned in [the forum](https://forum.typst.app/t/s… plitting-pdf-files-or-pulling-individual-pdf-page-from-pdf-file/6118/7?u=andrew), it makes no sense to restrict users from using `page-{0p}-of-{t}.pdf` as the output template name, since it's already available for PNG and SVG. And now there is [another similar post](https://forum.typst.app/t/will-it-be-possible-to-create-multiple-pdf-outputs-from-a-single-call-to-typst/6791?u=andrew).
Doing [this](https://forum.typst.app/t/splitting-pdf-files-or-pulling-individual-pdf-page-from-pdf-file/6118/8?u=andrew):
```sh
for page in $(seq 1 3); do typc --pages $page a.typ page-$page.pdf; done
```
or using other tools to split a single file into multiple is the current workaround.
But since there is `--pages`, I feel like there is little work needed to add this natively. Basically all the API/infrastructure already exist.
### Use Case
Support more automation/generation workflows.
hi all ---- I am wondering if I can separate pdf pages from a multiple page PDF file ??
thank you,
=Francis=
talb
December 11, 2025, 12:05pm
3
If the exams are meant to be printed, I would say that you don’t even have to generate distinct PDFs; you can put all the exams for every student in one big PDF and print it.
2 Likes
Questions on data-loading and Can I configure my document (e.g. draft/release version, color theme) when creating a PDF without modifying the Typst file directly? - #3 by SillyFreak in particular are definitely relevant here.
for separate PDFs, you can use a script to call the Typst compiler with different --inputs and so customize each PDF
for one joined PDF, you can provide your Typst document with e.g. a CSV file and then make a loop that produces the pages for each student
2 Likes