Is there a way to count pages in an easy way?

New Here ,
Jul 25, 2021 Jul 25, 2021

Copy link to clipboard

Copied

Hello, I would like to know if there is any help in InDesign to count number of selected pages. I am working on complex documents using different papers, so I have to build this book (320 pages) in blocks that are a multiples of 16. I could not find a fast way to count a portion of pages of the book so I am using a calculator. There might be something I do not see like being able to select a range of pages in the pages window an get the number of pages selected. Thank you...

TOPICS
How to

Views

244

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Jul 25, 2021 Jul 25, 2021

Copy link to clipboard

Copied

I'd use the Book Panel

Then you'd have separate documents/files for the 16 pages.

And you insert each file into the Book Panel.

That keeps each 16 pages in blocks. 

I'm assuming you don't want text to flow freely and some text that is supposed be in one type of paper doesn't automatically flow to a different type of paper?

 

If so - the book panel is perfect for you.

https://helpx.adobe.com/indesign/using/creating-book-files.html

 

*edit* alternate method

There might be a way to Script this - where it can apply a Colour Label to every 16 pages in order - so you'd have a visual colour of 16 page blocks in the pages panel.

You can do this manually by selection 16 pages and go to the Pages  panel sub menu

Window>Pages

 

You  might find this view easier to work with

EugeneTyson_0-1627204147762.png

 

Then 

EugeneTyson_1-1627204173064.png

 

 

Eventually your pages look like this

EugeneTyson_2-1627204230562.png

 

A script would be  faster but technically doesn't take long to do 320 pages manually.

 

Likes

Translate

Translate

Report

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
New Here ,
Jul 25, 2021 Jul 25, 2021

Copy link to clipboard

Copied

I never used the Book files. It always sounded to complicate for my needs but it might be the solution for this project. This book will have a clear separate structure:
1) text pages = Paper 1
2) images = Paper 2
3) seperate images = Paper 3
4) images = Paper 2 again
5) Legends, colophon... = Paper 1 again
(I just hope it will not take to long to learn about Book files)
thank you

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Jul 25, 2021 Jul 25, 2021

Copy link to clipboard

Copied

Definitely a book file is the way forward.

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Jul 25, 2021 Jul 25, 2021

Copy link to clipboard

Copied

We're here to help.

Let us know what you need.

 

Start by duplicating your file and backing it up.

 

Then you need to separate the book into sections. Which is a Save As and then delete all except 16 pages.

 

Repeat for all and save all your chapters as individual files.

 

Then make a new book file and add the chapters in order.

 

https://helpx.adobe.com/indesign/using/creating-book-files.html

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Jul 25, 2021 Jul 25, 2021

Copy link to clipboard

Copied

If you are just concerned about your document being multiples of a 16-page signature for the entire book (rather than each document), you could create a Preflight profile for the book. Change the number of pages to multiples of 16 and you will at least know there is a problem. You can then decide if you want to remove pages (anywhere in the document) or add pages at the end (such as "notes" pages). 

image.png

Likes

Translate

Translate

Report

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
New Here ,
Jul 25, 2021 Jul 25, 2021

Copy link to clipboard

Copied

oh, that's interesting, I did not know about that feature, thank you.

What I really would need is a display of the number of selected pages in the Pages window. Imagine it appearing next to the total number of pages for example.
In this project beside the different paper situation we have many photos to be organised in chapters. I have my client sitting next to me and asking constantly 'how many pages do we have in Chapter Portraits now?'

Screenshot 2021-07-25 at 18.39.33.jpg

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Jul 25, 2021 Jul 25, 2021

Copy link to clipboard

Copied

Using a book file would be a lot easier as each section would be a separate document, giving you quick page counts. 

 

Be sure to set your book pagination options before you inset any documents into the book. 

Likes

Translate

Translate

Report

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
Advisor ,
Jul 25, 2021 Jul 25, 2021

Copy link to clipboard

Copied

Humm! ...

 

Salut les experts !

 

Je crois, parce qu'il l'a dit 2 fois, que Laurent aimerait simplement sélectionner des pages dans le panneau “Pages” et obtenir le nombre de pages ainsi sélectionnées !

 

... ou alors ai-je mal compris quelque chose !

 

(^/)  The Jedi

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Jul 25, 2021 Jul 25, 2021

Copy link to clipboard

Copied

Yep. That's right. Do you have a method or am I missing something? 

 

Now that we understand the workflow and no out of the box solution for what's required, an alternate method to accomplish was considered.

 

A book file limiting each document to 16 pages is a good way forward. 

 

If you have a method it would be great to know what it is.

Likes

Translate

Translate

Report

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
Advisor ,
Jul 25, 2021 Jul 25, 2021

Copy link to clipboard

Copied

5 years ago, a client asked me if it was doable to export a pages range to pdf selecting them directly in the Pages panel.

I answered her she would simply need “1 click”! ..

Here, this will be even simpler: just give the pages range and (by substraction) their number.

 

(^/) on holiday this week!

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Jul 25, 2021 Jul 25, 2021

Copy link to clipboard

Copied

If you don't normally use "Color Labels" on Page panel, this script may be useful.

 

var doc = app.activeDocument, count = 0;
var undoHistoryLength = doc.undoHistory.length;
app.menuActions.itemByName("BLACK").invoke();
var pages = doc.pages;
for(var i = 0; i < pages.length; i++){
    if(pages[i].pageColor.toString() == "BLACK"){
        count ++;
        }
    }

if(doc.undoHistory.length > undoHistoryLength){
    doc.undo();
    }

alert("you selected  " + count + "  pages.");

 

 

In writing this script, I referred to my friend's site a bit.

https://uske-s.hatenablog.com/entry/2019/08/21/114922

I hope it helps.

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Jul 25, 2021 Jul 25, 2021

Copy link to clipboard

Copied

I do not see like being able to select a range of pages in the pages window an get the number of pages selected. 

 

 

You could temporarily open the Pages>MovePages... dialog and subtract the page range numbers. Here I have 74 pages selected (192-118=72):

 

Screen Shot 9.png

 

The Move Pages... menu item can be invoked via scripting, but I’m not sure if there is a way to get the dialog’s page range via a script

Likes

Translate

Translate

Report

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
New Here ,
Jul 26, 2021 Jul 26, 2021

Copy link to clipboard

Copied

I suppose the answer to my question is: No
there is no selected-pages-count in the PagesWindow or an other method of counting selected pages somwhere else.
(it seemed so evident that i was shure I was missing something. So please dear Adobe, put it on my wishlist.))
But I am using BookFiles now thanks to your answers!

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Jul 26, 2021 Jul 26, 2021

Copy link to clipboard

Copied

The best place to get this feature noticed by the indesign team is here

https://indesign.uservoice.com/forums/601021-adobe-indesign-feature-requests

 

Thanks

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Jul 26, 2021 Jul 26, 2021

Copy link to clipboard

Copied

why don't you try my script?

i'd post again.

var doc = app.activeDocument, count = 0;
var undoHistoryLength = doc.undoHistory.length;
app.menuActions.itemByName("BLACK").invoke();
var pages = doc.pages;
for(var i = 0; i < pages.length; i++){
    if(pages[i].pageColor.toString() == "BLACK"){
        count ++;
        }
    }

if(doc.undoHistory.length > undoHistoryLength){
    doc.undo();
    }

alert("you selected  " + count + "  pages.");

   スクリーンショット 2021-07-27 12.49.09.png

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Jul 27, 2021 Jul 27, 2021

Copy link to clipboard

Copied

Hi ajabon,

I guess your script will not work with a French version of InDesign.

Line 3 will throw an error "Object is invalid". I see that in my German InDesign as well.

 

Even if I change the first string from "BLACK" to "Schwarz" (German for "black") where is no error, the result could be wrong if there are other pages labeled with "Black":

 

WrongResult-PagesAreAlreadyLabeled.PNG

 

Interesting idea, though!

 

Regards,
Uwe Laubender

( ACP )

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Jul 27, 2021 Jul 27, 2021

Copy link to clipboard

Copied

hi Laubender,

Thank you for verifying and modifying the script. As I wrote in the first post, I proposed it on the premise that "LaurentDesignbureau does not normally use Color Labels".
I didn't know how to know which language you or he works in. I using Japanese.

 

And I hope him to try the script as well. (´Ꙩ ̫ Ꙩ`)

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Jul 27, 2021 Jul 27, 2021

Copy link to clipboard

Copied

Hi ajabon,

as you can see from your source you linked to:

var clr = {jp: "黒", en: "BLACK"};
var act = app.menuActions.itemByName(clr.jp);

one could easily prepare other strings in an object and apply the localized value.

Wheras I am asking myself why "BLACK" is not written as "Black".

 

You could also build a localization independent version. You only have to find the right key string. Surprisingly that's very easy:

app.menuActions.itemByName("$ID/Black").invoke();

Try this with your Japanese version of InDesign; it should work.

 

Regards,
Uwe Laubender

( ACP )

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Jul 27, 2021 Jul 27, 2021

Copy link to clipboard

Copied

LATEST

hi Lavender,
It worked in my language with the modifications you showed. Thank you very much.
I usually use

 

("$ ID / foo")

 

but this time I forgot ...
It's a little persistent, but I'll show you the whole code again.

 

var doc = app.activeDocument, count = 0;
var undoHistoryLength = doc.undoHistory.length;
app.menuActions.itemByName("$ID/Black").invoke();
var pages = doc.pages;
for(var i = 0; i < pages.length; i++){
    if(pages[i].pageColor.toString() == "BLACK"){
        count ++;
        }
    }

if(doc.undoHistory.length > undoHistoryLength){
    doc.undo();
    }

alert("you selected  " + count + "  pages.");

 

And I hope LaurentDesignbureau to try the script as well. (´Ꙩ ̫ Ꙩ`)

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Jul 26, 2021 Jul 26, 2021

Copy link to clipboard

Copied

Hi Laurent,

it is tricky to get the number of pages selected in the Pages panel.

Even by scripting. But I solved this issue some years ago with ExtendScript (JavaScript).

 

But here is another way doing this in the UI plus a small script, just one line of code, to alert the number of pages selected. Let's see, do it in exactly this order:

 

[1] Select the Page Tool

[2] Select the pages in the Pages panel

The Page Tool reflects this by selecting the same pages in your layout throughout your document.

[3] Run the following ExtendScript (JavaScript) code to alert the number of selected objects:

alert( "Number of selected pages:" +"\r"+ app.selection.length );

 

Example:

NumberOfSelectedPages-1.PNG

 

Regards,
Uwe Laubender

( ACP )

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Jul 26, 2021 Jul 26, 2021

Copy link to clipboard

Copied

Hi Laurent,

if you are interested in a script-only, high-complex code solution, look into this thread from 2017.

Note, that this is not directly a solution to your problem, but this solution could be added by two or three lines of code.

 

active page vs selected page
foltman, Jan 10, 2017

https://community.adobe.com/t5/indesign/active-page-vs-selected-page/m-p/8776559

 

My solution is presented here:

https://community.adobe.com/t5/indesign/active-page-vs-selected-page/m-p/8776565#M35095

 

But best read the whole thread to see how my idea evolved.

 

Regards,
Uwe Laubender

( ACP )

Likes

Translate

Translate

Report

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