Bug 84913 - Repagination on PDF export changes page number
Summary: Repagination on PDF export changes page number
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version: 4.3 Daily
Hardware: Other All
: medium major
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-11 13:32 UTC by Darius Daniel Grigoras
Modified: 2014-12-06 19:15 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Darius Daniel Grigoras 2014-10-11 13:32:41 UTC
Hi,

I work with a 2000 page master document and when I export it to PDF repagination is carried out, which somehow changes the increases the page count and so the page number in the table of contents does not correspond anymore with the real page number, though the link work.
I hope that you will allow disabling of repagination on export of PDFs or fix this repagination issue I encounter.

Regards,
Daniel
Comment 1 tommy27 2014-10-14 05:12:04 UTC
test file needed. I set status to NEEDINFO.
revert status to UNCONFIRMED when you provide requested infos.
Comment 2 Darius Daniel Grigoras 2014-10-14 07:00:06 UTC
(In reply to tommy27 from comment #1)
> test file needed. I set status to NEEDINFO.
> revert status to UNCONFIRMED when you provide requested infos.

All the documents I work with contain confidential and proprietary data and information.

However, I remember creating a sample master doc a while ago, which you can download from here:
https://www.dropbox.com/s/vz43d9x0v1t3fxr/master_for_support.zip?dl=0
Comment 3 tommy27 2014-10-14 08:46:44 UTC
thanks. I got the .odm master document and the other .odt file.

please tell me "step by step" what I have to do in order to reproduce the bug.

P.S. which LibO version are you using?
Comment 4 Darius Daniel Grigoras 2014-10-14 08:52:09 UTC
(In reply to tommy27 from comment #3)
> thanks. I got the .odm master document and the other .odt file.
> 
> please tell me "step by step" what I have to do in order to reproduce the
> bug.
> 
> P.S. which LibO version are you using?

I'm using version 4.3.2.2, build 430m0(Build:2), which should be the latest stable version.

To reproduce the bug just insert all of the subdocuments, i.e. the ODTs into the master document (ODM). Wait for it to reflow the text. Update the TOC and then export to PDF. Repagination is carried out and then the PDF is exported.

Looking in the PDF you will see that the page numbers mentioned in the TOC for the headings does not correspond anymore to the real page number.
Comment 5 tommy27 2014-10-14 09:07:45 UTC
(In reply to Darius Daniel Grigoras from comment #4)
> ...
> I'm using version 4.3.2.2, build 430m0(Build:2), which should be the latest
> stable version.

is it the first version you saw the bug or was present even in older releases?

> 
> To reproduce the bug just insert all of the subdocuments, i.e. the ODTs into
> the master document (ODM).

I'm not familiar with master documents, what should I do to insert the .odt inside the .odm?  drag and drop or what else?
Comment 6 Darius Daniel Grigoras 2014-10-14 09:45:17 UTC
(In reply to tommy27 from comment #5)
> (In reply to Darius Daniel Grigoras from comment #4)
> 
> 1. is it the first version you saw the bug or was present even in older
> releases?
> 
> 
> 2. I'm not familiar with master documents, what should I do to insert the .odt
> inside the .odm?  drag and drop or what else?


1. This is an old bug.

2. Insert->File
Comment 7 tommy27 2014-10-14 12:28:33 UTC
tested under Win7x64 using LibO 4.3.2.2

I dragged and dropped the .odt files into the .odm and the final document was 2285 pages. then I exported it to .pdf and the output was still 2285 pages.

maybe I'm missing something but a smaller test case would be better in order to easier spot the difference between source file and output
Comment 8 Darius Daniel Grigoras 2014-10-14 13:01:04 UTC
(In reply to tommy27 from comment #7)
> tested under Win7x64 using LibO 4.3.2.2
> 
> I dragged and dropped the .odt files into the .odm and the final document
> was 2285 pages. then I exported it to .pdf and the output was still 2285
> pages.
> 
> maybe I'm missing something but a smaller test case would be better in order
> to easier spot the difference between source file and output

Did you first update the table of contents before exporting the PDF?
Comment 9 Darius Daniel Grigoras 2014-10-14 16:32:30 UTC
Indeed, with that old anonymized version that I created about two months ago for use on the OpenOffice forum, things work well.

However,that did not have any hidden sections defined.
Please download a sample that has hidden sections defined in the subdocuments from here: https://www.dropbox.com/s/vz43d9x0v1t3fxr/master_for_support.zip?dl=0

You will also find a PDF version in which the headings in the TOC are not pointed to the right page.

You can now reproduce this easily. Just open the master document in which the subdocuments are already linked, click update links when asked, then updated TOC and export to PDF. You will see that repagination takes longer and that the page count in the PDF is different than the one reported in the master document before exporting to PDF.

So bottom line, this page number issue is caused by the use of hidden sections and repagination.
Comment 10 Darius Daniel Grigoras 2014-10-14 16:35:25 UTC
Moreover, not only that the page count does not correspond, but some or many of the pages at the end are not even exported into the PDF. From ten tries only once were all of the pages exported in my experience, and even then, the page count still differed from the one reported before exporting to PDF and the ones mentioned in the TOC.
Comment 11 tommy27 2014-10-14 20:07:15 UTC
please do not set status NEW to your own bugs. 
that status can be set only after an independent confirmation of the bug you submitted. reverting to UNCONFIRMED
Comment 12 A (Andy) 2014-10-25 13:20:06 UTC
Is this maybe related to the bug reports 85438 and 85435?  There you have sample files leading to different number of pages (54 vs. 55)?  
Is yes, we could maybe close this bug report and reopen it if it would still persist after bug fixes of these both bugs?
Comment 13 Darius Daniel Grigoras 2014-10-25 13:29:52 UTC
(In reply to A (Andy) from comment #12)
> Is this maybe related to the bug reports 85438 and 85435?  There you have
> sample files leading to different number of pages (54 vs. 55)?  
> Is yes, we could maybe close this bug report and reopen it if it would still
> persist after bug fixes of these both bugs?

It may be related to those, though I doubt it.
Actually, this has to do with hidden sections. I had to manually delete all hidden sections to produce the final PDF, as in the absence of hidden sections repagination did not occur and the page count was the same in the PDF as in the ODT.

As I have to produce updated PDFs regularly, it's time-consuming and annoying to delete the hidden sections each time.
Comment 14 tommy27 2014-11-24 11:45:39 UTC
have you tried 4.3.4.1 
is issue stille there?
Comment 15 Darius Daniel Grigoras 2014-11-24 12:51:09 UTC
I just couldn't find a way to update to the latest version on Ubuntu, as using the latest version on Windows I receive the Error message "Bad allocation", and LibreOffice crashes.
Comment 16 Darius Daniel Grigoras 2014-11-24 13:04:20 UTC
"sudo apt-get install libreoffice" installs version 4.3.3~rc2
Comment 17 Darius Daniel Grigoras 2014-11-24 13:06:32 UTC
"sudo dpkg -i *.deb" doesn't help
Comment 18 Joel Madero 2014-12-06 19:15:51 UTC
Please do not mess with the priority/severity - they have particular meanings and this does not in any way qualify as a blocker. Prioritizing your own bugs is not suggested as it's hard to be objective.

Setting to:
Major - apparent loss of data (page number) on export.
Medium


Again please don't change the priority again, it won't help get it fixed and it will only annoy developers and QA who try to be unbiased and objective in setting priorities.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.