[Solved] Page numbers change when saving ODT as PDF or DOC

Discuss the word processor
Locked
rkheadl
Posts: 20
Joined: Tue Oct 30, 2018 3:39 pm

[Solved] Page numbers change when saving ODT as PDF or DOC

Post by rkheadl »

I have a 700 p doc. in .odt when I save it as a .pdf or .doc the page numbers change. I have to have the sections in my doc. begin with odd numbers but this is what happens when I save in the two formats:

odt page number
297 becomes p. 303 in .doc and p.296 in .pdf
379 becomes p. 386 in .doc and p.377 in .pdf
417 becomes p. 424 in .doc and p.415 in .pdf
679 becomes p. 691 in .doc and p.675 in .pdf

My question is, how can I keep the .odt page numbers when I save as a .doc or .pdf? In other words, my pdf pages must be 297 where the letter N begins, 379 where the letter O begin, 417 where the letter P begins and 679 where the letter Q begins. I need to save as a .pdf doc. because I am using Textract software to index the document. I'm using Open Office 3.3.0
Last edited by Hagar Delest on Tue Jul 16, 2024 8:58 pm, edited 1 time in total.
Open Office 4.1.5 and iMac OS 10.11.6
User avatar
Hagar Delest
Moderator
Posts: 33633
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Page numbers change when saving .ODT doc. as .PDF or .doc

Post by Hagar Delest »

In addition, please remember that the .doc is a deprecated file format that was reverse engineered. Both suites do not work the same way (there is no page style in MS Office for example). Thus, it can lead to differences when exported to an external format.
LibreOffice may behave better but anyway, there is no point saving in .doc. Else, buy MS Office, but I'm not sure they have a good retrocompatibility either, from what I experienced at work with old .doc files.
Note that 3.3 is also quite deprecated by now.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
User avatar
RoryOF
Moderator
Posts: 35210
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Page numbers change when saving .ODT doc. as .PDF or .doc

Post by RoryOF »

In /File /Export as PDF, make sure "Export automatically inserted blank pages" is checked on the General tab of the export dialog. And only Export from the .odt file, not from the .doc file.
Apache OpenOffice 4.1.16 on Xubuntu 24.04.4 LTS
JeJe
Volunteer
Posts: 3132
Joined: Wed Mar 09, 2016 2:40 pm

Re: Page numbers change when saving .ODT doc. as .PDF or .doc

Post by JeJe »

If the answers above don't solve the problem...

Presumably the pages are a continuous run - have you tried comparing and looking for the first departures from the wanted page breaking to see why its occuring? You can insert manual page breaks to control where breaking occurs.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Mountaineer
Posts: 336
Joined: Sun Sep 06, 2020 8:27 am

Re: Page numbers change when saving .ODT doc. as .PDF or .doc

Post by Mountaineer »

On pdf-creation and wrong page-numbers there is also this bug-report originating from an ask-thread:
https://ask.libreoffice.org/t/page-numb ... f/107328/9
LibreOffice 7.6 on Windows 10pro and other Versions parallel
Mountaineer
Posts: 336
Joined: Sun Sep 06, 2020 8:27 am

Re: Page numbers change when saving .ODT doc. as .PDF or .doc

Post by Mountaineer »

rkheadl wrote: Tue Jul 09, 2024 11:46 pm.... I need to save as a .pdf doc. because I am using Textract software to index the document. ...
When googling Textract I stumbled over this: https://odftoolkit.org/simple/document/ ... actor.html

So there may be possibilities to gather your needed information directly from .odt
LibreOffice 7.6 on Windows 10pro and other Versions parallel
rkheadl
Posts: 20
Joined: Tue Oct 30, 2018 3:39 pm

Re: Page numbers change when saving .ODT doc. as .PDF or .doc

Post by rkheadl »

I have inserted blank pages to ensure letter starts on odd numbered page, but the .odt document is changed when I save it as a .pdf. The blank pages are still there but when .pdf repages they may become a different number. In other words, .pdf does not save an exact copy of my .odt document. I don't understand why.
Open Office 4.1.5 and iMac OS 10.11.6
User avatar
RoryOF
Moderator
Posts: 35210
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Page numbers change when saving .ODT doc. as .PDF or .doc

Post by RoryOF »

I have just tried /File /Export as PDF using a 384 page file; all pagination is correct.
Apache OpenOffice 4.1.16 on Xubuntu 24.04.4 LTS
JeJe
Volunteer
Posts: 3132
Joined: Wed Mar 09, 2016 2:40 pm

Re: Page numbers change when saving .ODT doc. as .PDF or .doc

Post by JeJe »

Does the font change at all in the pdf compared to the original?

edit: have you tried ticking the embed standard fonts option?
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
User avatar
Hagar Delest
Moderator
Posts: 33633
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Page numbers change when saving .ODT doc. as .PDF or .doc

Post by Hagar Delest »

I guess we need to have a look at the file. See here, there is a method to replace the text so that you can share a copy of your file: How to attach a document here.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
rkheadl
Posts: 20
Joined: Tue Oct 30, 2018 3:39 pm

Re: Page numbers change when saving .ODT doc. as .PDF or .doc

Post by rkheadl »

I'm going to try the export method. Previously I'd been using the save as PDF on the print page. That must be the problem.

Many thanks. I'll let you know what happens.
Open Office 4.1.5 and iMac OS 10.11.6
rkheadl
Posts: 20
Joined: Tue Oct 30, 2018 3:39 pm

Re: Page numbers change when saving .ODT doc. as .PDF or .doc

Post by rkheadl »

I tried the export method and that didn't work either.
Open Office 4.1.5 and iMac OS 10.11.6
User avatar
RoryOF
Moderator
Posts: 35210
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Page numbers change when saving .ODT doc. as .PDF or .doc

Post by RoryOF »

When I tested I used /File /Export as PDF, selecting PDF/A-1a and "Export automatically inserted blank pages" on the General tab of the Export dialog.
Apache OpenOffice 4.1.16 on Xubuntu 24.04.4 LTS
rkheadl
Posts: 20
Joined: Tue Oct 30, 2018 3:39 pm

Re: Page numbers change when saving .ODT doc. as .PDF or .doc

Post by rkheadl »

OK, I'll try it with Export automatically inserted blank pages, but the blank pages were not automatically inserted. I manually inserted them.
Open Office 4.1.5 and iMac OS 10.11.6
User avatar
RoryOF
Moderator
Posts: 35210
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Page numbers change when saving .ODT doc. as .PDF or .doc

Post by RoryOF »

Without actual "hands-on" of your document for analysis, we cannot know just what is causing a problem.
Apache OpenOffice 4.1.16 on Xubuntu 24.04.4 LTS
rkheadl
Posts: 20
Joined: Tue Oct 30, 2018 3:39 pm

Re: Page numbers change when saving .ODT doc. as .PDF or .doc

Post by rkheadl »

I think this problem has been solved. I have tried to edit my initial post, but I can't find the edit icon.
Open Office 4.1.5 and iMac OS 10.11.6
User avatar
Hagar Delest
Moderator
Posts: 33633
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Page numbers change when saving .ODT doc. as .PDF or .doc

Post by Hagar Delest »

rkheadl wrote: Tue Jul 16, 2024 6:44 pm I think this problem has been solved.
What was the fix in the end?
rkheadl wrote: Tue Jul 16, 2024 6:44 pm I have tried to edit my initial post, but I can't find the edit icon.
I have done that for you. See: how to add [Solved] at the beginning of the title in your first post (top of the topic) with the 🖉 button if your issue has been fixed.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
Locked