Bug 162374 - LibreOffice Writer does not create links in mail merge pdf outputs for second document and more
Summary: LibreOffice Writer does not create links in mail merge pdf outputs for second...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.5.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Mail-Merge
  Show dependency treegraph
 
Reported: 2024-08-06 17:01 UTC by Stephen Ostrow
Modified: 2024-08-26 18:52 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Database to get information from for the mail merge (15.76 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-08-26 18:46 UTC, Stephen Ostrow
Details
Writer file to be used as the template of the mail merge (20.76 KB, application/vnd.oasis.opendocument.text)
2024-08-26 18:47 UTC, Stephen Ostrow
Details
THE FIRST PDF document created from the mail merge of the template file with the database file (36.34 KB, application/pdf)
2024-08-26 18:48 UTC, Stephen Ostrow
Details
THE Second PDF document created from the mail merge of the template file with the database file (35.45 KB, application/pdf)
2024-08-26 18:50 UTC, Stephen Ostrow
Details
The Third PDF document created from the mail merge of the template file with the database file (35.28 KB, application/pdf)
2024-08-26 18:51 UTC, Stephen Ostrow
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Ostrow 2024-08-06 17:01:49 UTC
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
Comment 1 Dieter 2024-08-25 11:04:10 UTC
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
Comment 2 Stephen Ostrow 2024-08-26 18:46:35 UTC
Created attachment 196031 [details]
Database to get information from for the mail merge
Comment 3 Stephen Ostrow 2024-08-26 18:47:10 UTC
Created attachment 196032 [details]
Writer file to be used as the template of the mail merge
Comment 4 Stephen Ostrow 2024-08-26 18:48:24 UTC
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.
Comment 5 Stephen Ostrow 2024-08-26 18:50:20 UTC
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.
Comment 6 Stephen Ostrow 2024-08-26 18:51:13 UTC
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.
Comment 7 Stephen Ostrow 2024-08-26 18:51:56 UTC
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.