Suppose I have 4 PDFs:
Now I want to combine them in the given order. I also want to create bookmarks to their first pages in the combined PDF.
The number of pages in any of the component PDFs is variable (They refer to different PDFs at different runtime created by a python program). The number of pages in any of them could become 1.
My search resulted in many posts but all of them assumes that the number of pages in the component PDF document is known beforehand (implicitly).
How that could be done? Any help will be highly appreciated.