Description: If you save a mail merge to individual pdf documents, the links contained in the table of contents to pages within the document only work for the first created output document. Document #2 and greater, the links are missing from the document. Steps to Reproduce: 1. Create a Writer Document 2. Insert a Table of Contents on page 1 3. Insert a page break and add a header element on page 2 4. Repeat step 3 5. Repeat step 3 6. Create a spreadsheet in LibreOffice Calc with 10 rows and two columns 7. Insert a field from the spreadsheet using mail merge in the Writer document 8. Save Merged Document 9. Choose to Create separate documents 10. Choose type pdf 11. Open the first merged pdf 12. NOTE, clicking on an element of the table of contents takes you to the page 13. Open the second merged pdf 14. NOTE, clicking on an element of the table of contents does nothing 15. Repeat 13 and 14 for subsequent merged documents Actual Results: The second outputted merged pdf document does not contain links in the table of contents. The first outputted merged pdf document does contain links in the table of contents. Expected Results: ALL outputted merged pdf document should contain links in the table of contents. Reproducible: Always User Profile Reset: No Additional Info: Version: 24.2.5.2 (X86_64) / LibreOffice Community Build ID: bffef4ea93e59bebbeaf7f431bb02b1a39ee8a59 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded
Stephen, thank you for reporting the bug. Unfortunately, some steps are not clear to me: Step 3: Why do you need a header element. Or doe you mean heading? Step 7: So spreadsheet contains adresses for mailmerge and "insert a field" means to insert addresss with mail merge wizard, correct? Perhaps it vould be helpful, if you add document after step 5 and calc-document => NEEDINFO
Created attachment 196031 [details] Database to get information from for the mail merge
Created attachment 196032 [details] Writer file to be used as the template of the mail merge
Created attachment 196033 [details] THE FIRST PDF document created from the mail merge of the template file with the database file Note, this is the first pdf document which is output from the mail merge. You'll note if you open it and click on one of the elements of the table of contents, it correctly goes to that page and header. Subsequent files create, this functionality will not work.
Created attachment 196034 [details] THE Second PDF document created from the mail merge of the template file with the database file This is the second pdf document output from the mail merge. You'll note if you go to the first page and attempt to click on one of the elements of the table of contents, you will NOT be taken to that location. This functionality WORKS for the first output document, but will not work for this one or any subsequent output document.
Created attachment 196035 [details] The Third PDF document created from the mail merge of the template file with the database file This is just to drive home the point that the linking functionality of the table of contents is no longer working for documents output after the first one. This is the last document in this mail merge.
Dieter, Let me know if the information I've added is enough to show case the bug as well as being able to reproduce it.