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

Set a page numbers but every number in different place / how to automatize, script

New Here ,
Aug 22, 2022 Aug 22, 2022

Copy link to clipboard

Copied

Hello,

 

I have a file with around 500 pages. Would like to put a page numbers on each page however every number is in different place on each page (going from up to the bottom - so for example number 1 on first page is up up, and number 2 on second page a bit lower, number 3 on third page even more lower then on second page etc.) is it a way to automatize it? Maybe someone know some script how to do it? or maybe in photoshop?

TOPICS
How to , Scripting

Views

264

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

correct answers 1 Correct answer

Community Expert , Aug 22, 2022 Aug 22, 2022

The only way I can think of to do this without a script would be to create a series of Parent pages with the page number marker moving down the page in the required progression, then assigning the correct parent pages in order to the document pages.

To say the least this is probably more cumbersome than simply manually postioning the markers on the document pages to begin with unless you need to repeat the pattern multiple times in a long document.

Votes

Translate

Translate
Community Expert ,
Aug 22, 2022 Aug 22, 2022

Copy link to clipboard

Copied

The only way I can think of to do this without a script would be to create a series of Parent pages with the page number marker moving down the page in the required progression, then assigning the correct parent pages in order to the document pages.

To say the least this is probably more cumbersome than simply manually postioning the markers on the document pages to begin with unless you need to repeat the pattern multiple times in a long document.

Votes

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 ,
Aug 22, 2022 Aug 22, 2022

Copy link to clipboard

Copied

Thank you 🙂

makes sense

Votes

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
Community Expert ,
Aug 22, 2022 Aug 22, 2022

Copy link to clipboard

Copied

This could probably be automated in several ways, but by the time that much effort is expended, you could simply place all the numbers manually.

  1. Create all your pages (1-500).
  2. Lay a separate text flow on the outer edge of the Parent pages (something like 2pc wide, inset from the edge about 3px, with the main text frame starting at about 6pc).
  3. Use something like Excel to create a list of numbers 1-500 and export as text. Edit as necessary to produce one number per line.
  4. Drop this text into the side frame.
  5. Create a style that puts a page break before every paragraph. You should now have sequential numbers at the top of each page's side frame.
  6. Then select each side text frame and put a specific top margin space in it, pushing each page number down by its proportional amount.

 

If the text frame height is 10 inches, that's 720 points, so each frame should have the top margin increased by 1.44 points. You can probably choose layout scale that makes this easier, in rounded numbers at least. Any calculator should be able to generate an iterative total* so all you have to do is:

  1.  Page down.
  2. Select page number or text frame.
  3. Ctrl-B to open frame.
  4. Enter top margin value in field; Ok.
  5. Tap Equals on calculator to generate next +1.44pt value.
  6. Go to Step 1.

 

This process could probably be automated with a script, but even manually, it's no more than about 30 minutes of work. Quicker than hours to work up an automated solution that works precisely.

 

* The Windows calculator, for example. Enter + 1.44. Every time you tap Enter, the value will be increased by 1.44.

 


╟ Word & InDesign to Kindle & EPUB: a Guide to Pro Results (Amazon) ╢

Votes

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
Guide ,
Aug 22, 2022 Aug 22, 2022

Copy link to clipboard

Copied

[Just For Comment: paid Script I wrote in 2018 for US editors]

 

Comment mentioned in the Script:

 

/******************************************************************************************
Simplistically…
On the First Page of the Document, 2 Text Frames containing a "Page Number" Variable:
[better to place them on a specific layer!]
• the "top" (beginning) text frame [means: the "first page number, on the first page"],
• the "bottom" (last) text frame [means: the "last page number, on the last page"].
Select the "top" then the "bottom" [2 selected text frames] and just run the Script!
******************************************************************************************/
 

 

Capture d’écran 2022-08-23 à 01.10.07.png

 

Capture d’écran 2022-08-23 à 01.11.02.png

 

Best,

 

(^/)  The Jedi

Votes

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
Community Expert ,
Aug 22, 2022 Aug 22, 2022

Copy link to clipboard

Copied

You gotta be kiddin' me. 😄

 


╟ Word & InDesign to Kindle & EPUB: a Guide to Pro Results (Amazon) ╢

Votes

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
Guide ,
Aug 22, 2022 Aug 22, 2022

Copy link to clipboard

Copied

I was thinking of making a video but processing 500 pages only takes less than 3 sec. after clicking on the Script! …

 

(^/)  😉

Votes

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
Community Expert ,
Aug 22, 2022 Aug 22, 2022

Copy link to clipboard

Copied

Hi @Sonia5C3A, Try selecting the auto page number on your master and run this script. If it is facing pages run the script twice once for the left and once for the right masterpage:

 

app.scriptPreferences.measurementUnit = MeasurementUnits.POINTS;

var doc = app.documents.item(0);
var h = doc.documentPreferences.pageHeight;
var ps = doc.selection[0];
var pgs = doc.pages.everyItem().getElements();
var b = ps.geometricBounds;
var y = b[0]
var th = b[2]-b[0];
var md = h-(y*2)-th; 
var ma = md/(pgs.length)
var cnt = 1;
var mpi, pn;

for (var i = 0; i < pgs.length; i++){
    mpi = pgs[i].masterPageItems
    for (var j = 0; j < mpi.length; j++){
        if (mpi[j].id == ps.id) {
            pn = mpi[j].override(pgs[i]);
            pn.move( [ 0 , 0 ] , [ 0 , ma * cnt ] );
        } 
    };   
    cnt++
};   

app.scriptPreferences.measurementUnit = AutoEnum.AUTO_VALUE;

 

Screen Shot 10.pngScreen Shot 11.png

Votes

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
Community Expert ,
Aug 23, 2022 Aug 23, 2022

Copy link to clipboard

Copied

LATEST

Here’s the saved script with a 500 page test document:

 

https://shared-assets.adobe.com/link/b6ae006b-3873-4e02-604b-8fccd8da6538

 

Votes

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