@Ellen - in other thread I’ve given you full solution for one file using only Swift script, which analyse TOC file in format required by you, split PDF and write pages in files which names are build on TOC content - first element of TOC. Now I see, that output file has additional part: