I am writing a document in Overleaf. I need to merge it with a front page PDF after downloading, but the merging causes the resultant PDF to lose all the hyperlinks and bookmarks.
- Add the front page, back page whatever in overleaf itself using \includepdf[pages=-]{file.pdf}.
- If step 1 works for you right away, you can skip the next steps as the PDF you download will have working hyperlinks. Sometimes, /frontmatter or other commands might alter your placement of the front page in overleaf. For that, go to step 3.
- Download the PDF, and use qPDF to rearrange the pages as needed
- For example, if the /frontmatter command messed up placement of front page and the frontmatter such that page 1 of pdf is now frontmatter, and page 2 is front page, this command will restore the order: