Description: I am doing a mail merge, where a text should be hidden if a data field is empty. The output is to individual files. The text is correctly hidden if the output file format is ODF, but it is not hidden if the output file format is PDF. Steps to Reproduce: 1. download sample data (a zipped file with the calc spreadsheet, the writer document, and the output files). 2. open test-bug.odt and press CTL+P to print the document. 3. Answer Yes to the question : "Your document contains address database fields. Do you want to print a form letter?" 4. specify output to file, save merged document as individual documents, generate the file name from the database (field1). 5a. specify the file format as "ODF Text Document". 5b. specify the file format as "PDF - Portable Document Format". Actual Results: If file format is ODF Text Document (odt), the text is hidden if a data field is empty, see ccc.odt : no field2 text. If file format is Portable Document Format (PDF), the text is not hidden if a data field is empty, see ccc.pdf : field2 text appears. Expected Results: If file format is Portable Document Format (PDF), the text is hidden if a data field is empty, see ccc.odt : no field2 text. Reproducible: Always User Profile Reset: No Additional Info: see sample data in attachment
Created attachment 184107 [details] sample data with spreadsheet, database and writer doc to reproduce the problem
Reproduced, the ccc.pdf shows field2 : while there is nothing in the ODT. Bibisected with Linux 43all repo to range https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=43c7830b03d141ae11d8617c0fdabefa32dd243c..ce97851773a06103504972eb2771eecd7dd81e36 I tried grepping inside the range with queries like git log 43c7830b03d141ae11d8617c0fdabefa32dd243c...ce97851773a06103504972eb2771eecd7dd81e36 --grep=mail but could not find anything relevant. The range covers about 2 months. Later there was a change that affected the output (d7e0d0135ba65243fab5ee038c21290b8e74e548)
(In reply to Buovjaga from comment #2) > Later there was a change that affected the output > (d7e0d0135ba65243fab5ee038c21290b8e74e548) I meant the regression causing 356d93766e27337a5463e793ceeb9da757a3a37f
*** Bug 153247 has been marked as a duplicate of this bug. ***
Mike: your db04be037b611e296ef9f2542322c52ed82d7a2b made the field names be hidden by default "for any non-native documents", but apparently this does not extend to PDF.
(In reply to Buovjaga from comment #5) This is unrelated to PDFs being "non-native" (because the output PDF is *generated*, not read). But yes, this is an implementation defect. Needs debugging and fixing. (No cycles to take it, sorry :) - please use the old "hidden paragraph" fields as a workaround, until someone fixes it.)
Thanks, I'll adjust the meta data