Description: Using the PDF export button in Writer, if I have a hidden paragraph that is also a numbered paragraph, the paragraph numbers are printed. This does not affect printing, only exporting to PDF. Steps to Reproduce: 1. Create a series of numbered paragraphs. 2. Insert some text in the numbered paragraphs. 3. Insert the "hidden paragraph" field at the start of each of the paragraphs 4. Export to PDF Actual Results: The numbered paragraphs are shown in the PDF with their paragraph numbers but without the text of the paragraph. Expected Results: The entire paragraph, including the paragraph numbers, should be omitted as occurs when printing. Reproducible: Always User Profile Reset: No Additional Info: Version: 7.5.8.2 (X86_64) / LibreOffice Community Build ID: 50(Build:2) CPU threads: 32; OS: Linux 6.1; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Debian package version: 4:7.5.8-1~bpo12+1 Calc: threaded
On further testing, something has gone very wrong with the PDF export in this latest version. It can differ in other ways from a print to PDF, a print to paper, or a print preview. If I have a two-column section on the page, followed by a one-column section, the second section is forced onto the next page and the two-column section does not (as it should) split the content evenly between the two columns (instead continuing down the left hand column and leaving the right hand column empty). Has there been a complete rewrite?
I can also see that the document is being altered before the PDF export and then altered after (the alterations show progressively on screen as if somebody were editing the document). Also if I put numbered paragraphs in a hidden section, and reference the content of the numbered paragraphs elsewhere (with a cross-reference to the numbered paragraph), the cross-references get broken on export to PDF. It is as if the hidden section is being deleted then reinserted so that the cross-references no longer link to the right place. The whole approach being taken in this PDF export now seems to be fundamentally broken as designed. The PDF export should not be altering the document.
Also tried leaving my numbered paragraphs out of a hidden section, then changing the numbering style so that its numbering format is "none" and removing the before-and-after text - the PDF export seems to delete the paragraph entirely then reinstate it after the export, and the cross-references break again.
Actually it seems to delete the hidden paragraph content no matter what, when doing the PDF export, leaving the cross-references broken. This export engine is unworkable. Is there any way to revert to the old PDF export short of going back to an earlier version of LibreOffice? These bugs should be ranked as critical. An export engine that modifies the document contents should never have been allowed into the code base.
It seems this can be ameliorated by, instead of exporting directly to PDF (using the button or the corresponding menu item), using the "Export as PDF..." menu item and going through the dialog. It is not at all clear why the behaviour should be so different between the two.
Both, through menu or icon (directly) are the same, and the second use the last options selected in the first. Please test in safe mode, Menu/Help/Restart in Safe Mode Please attach a sample file.