Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

I need help showing the number of pages in a book

Explorer ,
Feb 11, 2025 Feb 11, 2025

I am laying out a technical manual and need to have the page numbers styled as  "Page 1 of 299"  Each chapter is it's own document and I have them in a book.  Book panel shows pages fine, but when I print the page numbers are inaccurate only showing the number of pages in that section.   Example: Section one has 14 pages  and the next starts at 15 as it should.  However the number of pages just won't  go.  Example:  Chapter 1  Page 1 of 14,  Chapter 2:  Page 15 of 15 etc.  I want it to be  Page 1 of 27, Page 15 of 27. 

 

In each document I used the "Last Page Number" but it is only counting for that one chapter.   How can I make it when I print to have this correct.   I can't hard code the number of pages because it is a living document. 

 

Can some one help please?   

Book panel is correct

Lorrieann_0-1739294851519.png

Last page of Chapter 2

Lorrieann_1-1739294918892.png

First page on Chapter 3

Lorrieann_2-1739294945524.png

 

 

 

TOPICS
How to
1.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Guide , Feb 14, 2025 Feb 14, 2025

I've found an old Script written for a client 7 years ago [mai 2018].

I've added a "B" version to make it more fun! …

 

Book.gif

 

Simple Process:

 

• The op opens a book with docs using a basic page numbering on parent pages [I mean e.g. just "A"].

• [s]he runs the first Script [_FRIdNGE-0798A]. It mainly creates the "Total Pages Number" text variable in all the docs and accessorily updates the book page numbering.

• [s]he opens any document, jumps to any parent page with a page numbering text frame and types t

...
Translate
Engaged ,
Feb 11, 2025 Feb 11, 2025

When you created the Text Variable to define the total page count in the document, did you choose "Document" as the scope? When I chose that, it gave me total page count of doc.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 11, 2025 Feb 11, 2025

@davecourtemanche 

 

But the scope you're referring to is for the current Document - @Lorrieann needs the scope for the Book - which isn't available.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 11, 2025 Feb 11, 2025

If you look at the screen shots I posted, that is a book file. Showing the proper page count. ???

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 11, 2025 Feb 11, 2025
quote

If you look at the screen shots I posted, that is a book file. Showing the proper page count. ???


By @davecourtemanche

 

Yeah, but you are doing it for the LAST document. 

 

I've tried the same - and it doesn't work like you wish in earlier documents of the Book - it will only show last page in the CURRENT document - not the LAST document in the Book.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 12, 2025 Feb 12, 2025

That is my experience as well.  

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 11, 2025 Feb 11, 2025

@Lorrieann 

 

I'm not sure if it's possible - to get number of pages in the Book - but you can cheat a little - insert a TextFrame instead of the "last page number" - and link it to a file on your drive.

 

RobertatIDTasker_2-1739301232044.png

 

 

RobertatIDTasker_1-1739301160038.png

 

You need to use RTF/DOCX as TXT won't keep formatting applied when you update contents of this file.

 

You just need to make sure that the name of the ParaStyle in Word will be EXACTLY the same as in your InDesign document.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 11, 2025 Feb 11, 2025

@Lorrieann 

 

You can even set Auto Width option in the applied Object Style:

RobertatIDTasker_3-1739301361936.png

 

RobertatIDTasker_4-1739301374625.png

 

 

And after editing contents of the RTF file and updating link in InDesign:

RobertatIDTasker_5-1739301408652.png

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 11, 2025 Feb 11, 2025

There are a lot of scripting pros around here that may be able to offer a way to account for all the pages in a given InDesign book file and populate a text variable that takes all of that into account.

 

But if not, I'd suggest you have two remaining options: either compile a single InDesign document with all your pages and then let your "Last Page Variable" do the work, or simply let the book file paginate all your InDesign documents, then go to each document's parent page(s) and replace the variable with the total number of those pages. Given the volume of work, I think the second option would be the best course of action.

 

Randy

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 12, 2025 Feb 12, 2025

Thank you.  The reason I have the chapters separated is there are common pages across other books.  I want to update once.   

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 11, 2025 Feb 11, 2025

Create a unique paragraph style, such as "Last Page Number" and place an empty paragraph at the very end of the document. Then use a cross-reference to that file/page. The cross-reference will update when you update the book.

 

 

David Creamer: Community Expert (ACI and ACE 1995-2023)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Feb 12, 2025 Feb 12, 2025

Smple way to play the game:

 

Create a personalized Text Variable you can call "Total Pages Number" and give to it the total pages current number of the book, e.g. "142". If, in the future, this number changes, just modify this number in the main document (doc_1.indd here).

 

Capture d’écran 2025-02-12 à 23.55.02.png

 

Insert this Text Variable on the parent Pages of all the Book documents, with the Page Number, as, e.g. "Page A of 142".

 

To finish, make sure the "Text Variables" are checked in the Book Synchronization Settings …

 

Capture d’écran 2025-02-12 à 23.55.39.png

 

Select All the Documents and Synchronize them! That's all!

 

Capture d’écran 2025-02-12 à 23.56.18.png

 

I've added 14 pages in the book! It took me 23 seconds to change the number of the Text Variable in the doc_1.indd, select all the documents in the Book Palette and synchronize.

 

(^/)  The Jedi

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 12, 2025 Feb 12, 2025

It's difficult at all, in fact, @Randy Hagan already mentioned that technique. However, if the page count is still in flux, the cross-reference method is more efficient. It's the method that has been used in Adobe FrameMaker for decades until they finally added a book page count variable. 

 

David Creamer: Community Expert (ACI and ACE 1995-2023)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 14, 2025 Feb 14, 2025

I have tried that approach, but could not get it to work as you suggested. I like this idea a lot and just need to get it to work properly. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 14, 2025 Feb 14, 2025

Here is the step-by-step:

Create the zLastPage style and place it on the last page (I colored the text as none). It can also be at the end of your text flow.

image.png

On a document's parent page, insert the cross-reference after the regular page number:

image.png

On the book, go to Sync. Options:

image.png

Sync the parent pages and cross-references across the book:

image.png

If your page count changes, just update the cross-references.

 

David Creamer: Community Expert (ACI and ACE 1995-2023)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 14, 2025 Feb 14, 2025

That is an interesting approach.  But I can see people forgetting that and not changing it when pages are added or removed.  I really need it to be dynamic.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 14, 2025 Feb 14, 2025

@Lorrieann

 

How about my idea with an external text file? 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Feb 14, 2025 Feb 14, 2025
LATEST

I've found an old Script written for a client 7 years ago [mai 2018].

I've added a "B" version to make it more fun! …

 

Book.gif

 

Simple Process:

 

• The op opens a book with docs using a basic page numbering on parent pages [I mean e.g. just "A"].

• [s]he runs the first Script [_FRIdNGE-0798A]. It mainly creates the "Total Pages Number" text variable in all the docs and accessorily updates the book page numbering.

• [s]he opens any document, jumps to any parent page with a page numbering text frame and types the right header text (here:  "page A on ") and finishes by inserting the "Total Pages Number" text variable.

WARNING: the op needs now to select the header text and copy it in the clipboard.

• [s]he runs the second Script [_FRIdNGE-0798A]. It mainly updates the header text on all the parent pages and accessorily updates the book page numbering.

 

Now, if the Layout moves by pages addings/removings, or, e.g., if new documents are added (or removed) at the end of the book, the op will still just need to update the pages numbering by running the first Script [_FRIdNGE-0798A] again. So just "1 click"!  😉

 

(^/)

[paid Scripts]

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines