Created attachment 143110 [details] Example document I order to reproduce: [1] Open attached document. [2] Select the content of page 2 and page 3. [3] Print selected pages: (a) Menu: File > Print > General > Selection. A preview of page 2 is displayed. The page number is 4. Expeted: 2. (b) Click OK: Pages 2 and 3 are printed. The page number on both pages is 4. Expected: 2 and 3. The page numbers are also wrong if you export the selected pages to a pdf document. Tested with version 6.0.5 (64 bit, Win 10). Bug already exists with version 3.6.7. Version 3.3.0 behaves different, but the page numbers are also wrong.
Reproducible for me with LO 6.2.0.0.alpha0+, with LO 6.0.4 and LO 6.1.0.0.beta2+ Note: you need to use print dialog from LibreOffice (option set in menu Tools > Options > LibreOffice > General) Status set to NEW. Best regards. JBF
I did my tests under Linux -> set OS accordingly. Best regards. JBF
Repro 7.1+
*** Bug 140499 has been marked as a duplicate of this bug. ***
Although OP's perspective is probably the most common one, I suppose that this scenario is a bit ambiguous. There might be situations where the current situation is desirable. The workaround I would use would be to export the entire document to PDF, and then print selected pages from the PDF. However, that doesn't really solve the problem of printing a "selection" - since that might not be requesting the entire pages. But even the selection might not meet expectations - since basically it seems to be creating a new document and just printing that. (Using attachment 143110 [details] as an example, I selected to print just one 2, and two 3's. The result was not one 2 on the first page, and two 3's on the second page, but a 2,3 on the first page, and the remaining 3 on the second page.) So, basically page numbers are irrelevant when printing a selection - it doesn't even make sense to use the current page numbers since the content might be different from what would be printed on that page when the entire document is printed. What does Microsoft do in this situation? Word 2016 did the same as LO - except that it did not print the header or footer at all.
There might not be a perfect solution for this problem, and possibly looking only what Microsoft does also isn't the perfect solution. I wonder: If you take the traditional workflow of extracting a few pages from a book using a photo-copier, that would be the approach of just printing selected pages from a PDF. However when you extract whole pages, more than desired would be printed, and when you would "white redact" the non-selected parts on the first and last pages, then someone might complain that paper is wasted (e.g. if 90% of the first page is blank, while the last page only used 10%). "Reflowing" the text would prevent unused blank areas, but it would break formatting. So I have a weak tendency towards the "white-redacted PDF pages" approach. The other advantage would probably be that automatic text references and chapter numbers would be right. Maybe there could also be some checkbox that toggles between "preserve page layout and references" and "reflow text, saving paper".
Clearly a bug to me when one option messes up with variables. Don't see need for UX input.
I retested printing as PDF. The content printed it's correct. Just the page number is 4 on pages 2 and 3. Retested on Version: 7.4.0.0.alpha0+ / LibreOffice Community Build ID: 2f4f4cbeb8e50081d607b86b0475b93971c40ab8 CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: gtk3 Locale: ro-RO (ro_RO.UTF-8); UI: en-US Calc: threaded
In my opinion, this is a clear WONTFIX. The correct answer is "content dependent" and thus there simply cannot be a correct approach. Plus doing anything there would be extremely complex and error-prone. Probably the most correct approach is to create a sub document without headers/footers - basically the Microsoft approach. (In reply to Justin L from comment #5) > The workaround I would use would be to export the entire document to PDF, > and then print selected pages from the PDF. No, that would be no different than "specify pages to print" which LO already does.