Apache OpenOffice (AOO) Bugzilla – Issue 99346
OOo opens files as "Page 1/2" before correcting itself to "Page 1/1"
Last modified: 2013-01-29 21:38:30 UTC
On some documents, OOo will open a Writer file (in my case a template) with an extra page before it correctly adjust to a single page document (ie, "Page 1/2" then an immediate "Page 1/1"). This is causing a problem when processing documents rapidly through automation, because the template file doesn't alway re-adjust in time before updates on that file begin (my assumption). The result is an opened document with a second (and invalid) page. This behavior is reproducible both manually opening the files, and through UNO automation. Additionally, I testing this out on both Windows and Linux. I will attach a sample document for which this occurs.
Created attachment 60267 [details] Example Document that loads at 2 pages before re-adjust to a single page (.ott)
reproducible, but you can force a refresh using the api and then start processing, can't you?
An apparent workaround has been found, but this has only been tested on ~200 instances of processing a document. Therefore, this might not be a temporary solution at all, but instead a case of me just getting lucky with my testing. From the View menu, choose Zoom. I set "Zoom Factor" to "Fit width and height", and "View layout" I kept as "Automatic". Now, opening a problem document correctly loads it as page 1/1, without any page count re-adjustment. I will follow up if this "workaround" proves false.