incubator-odf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Asier <avsg...@gmail.com>
Subject Re: Update page count in generated document
Date Sat, 01 Dec 2012 20:33:59 GMT
On Sábado 01 diciembre 2012 21:18:29 usted escribió:
> On Sábado 01 diciembre 2012 16:29:21 Rob Weir escribió:
> > > How can I force an update of all the page count footers and the index?
> > 
> > An ODF document -- as just a static document on disk -- has no concept
> > of a page.  A page only exists when the contents of a document are
> > rendered according to a layout algorithm, taking into account page
> > size, printer and font metrics, etc.
> > 
> > So if you are using a tool that modifies the file format directly,
> > without a full rendering of the document, it is hard to determine
> > absolute page numbers or page counts.  However, once you load the
> > generated document in an editor it should re-render the document and
> > calculate and update the page breaks, page numbers, page counts, etc.
> 
> It's something strange because the "actual" page number is created with the
> appropiate value. Ex:
> 
> "Page 20 of 20" -> for last page before adding contents
> "Page 21 of 20" -> first added page
> "Page 22 of 20" -> second added page
> ...
> 
> So in a generated document some fields get updated and others not (page
> count, index)? why?
> 
> If I can't get the total page count updated via code, I suppose that to
> render the document an instance of OpenOffice/LibreOffice must be used;
> this could be tricky in a headless server environment (at least in my
> scenario).
> 

Sorry - our own fault. If the last page is 20, then appears like this:

> "Page 16 of 20" -> 
> "Page 17 of 20" -> 
> "Page 18 of 20" -> last page

In the document the total page count (20) is ok, the problem is that some pages (the 
covers) don't get counted as individual pages -- the first logical page in the document is

the third "real" page-- but are counted for he total page count. 

I'll look into the template document.

Regards

Mime
  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message