-
1. Re: Display page size
Chinnadk Jul 30, 2014 8:58 PM (in response to Mrtreebis)Hi,
Create a textvariable named "PageSize" type should be "Custom Text", add it to the Indesign library object and run this script.
var doc = app.activeDocument; doc.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.millimeters; doc.viewPreferences.verticalMeasurementUnits = MeasurementUnits.millimeters; var w = doc.documentPreferences.pageWidth, h = doc.documentPreferences.pageHeight, pagesize = app.activeDocument.textVariables.itemByName("PageSize"); pagesize.variableOptions.contents = w + " mm X " + h + " mm";Regards,
Chinna
-
2. Re: Display page size
Jump_Over Jul 31, 2014 12:29 AM (in response to Mrtreebis)Hi,
Just in case...
Since predefined library object is going to mix with a script action - maybe a better solution is to do a job by script from the beginning to the end?
advantages:
- one action involved by keyboard shortcut
- possible to manage various page's sizes in the sam doc
- open to include other (many?) infos
disadvantages:
- this script does not exist (?) yet
Jarek
-
3. Re: Display page size
Luc Lorent Jul 31, 2014 6:31 AM (in response to Chinnadk)Watch out for pages of whom the page size has been changed.
The width and height of the document preferences are different from the actual page size in that case.
-
4. Re: Display page size
Mrtreebis Jul 31, 2014 1:38 PM (in response to Mrtreebis)Many thanks for such a quick reply Chinnadk - have tried this and seems to work - really appreciate your help. The measurements shown seem to have a lot of decimals after though??
-
5. Re: Display page size
Mrtreebis Jul 31, 2014 1:39 PM (in response to Mrtreebis)Luc Lorent - yes I agree, we do sometimes change the page size independently to the document setup, so in that case we could then be displaying the wrong info - is there a way to change it to display page size instead?
The other concern i would have is that the "PageSize" text variable is only updated on running the script (things such as file name update automatically) so if we amended the size, and forgot to run the script, there is a danger we could be passing on the wrong info. Don't know if this is achievable!?
-
6. Re: Display page size
Mrtreebis Jul 31, 2014 1:42 PM (in response to Mrtreebis)Hi Jump_Over - yes i had wondered about whether that was a better option instead of trying to work with the existing library item - throwing out the challenge then to anyone interested!!!?
Thanks for everyones input.
-
7. Re: Display page size
Mrtreebis Aug 1, 2014 6:44 AM (in response to Chinnadk)Many thanks for such a quick reply Chinnadk - have tried this and seems to work - really appreciate your help. The measurements shown seem to have a lot of decimals after though?? (instead of 210x297 displays 209.999999999936 mm X 296.999999999461 mm) Do you know how i would change it please!?
-
8. Re: Display page size
Mrtreebis Aug 1, 2014 6:45 AM (in response to Luc Lorent)Luc Lorent - yes I agree, we do sometimes change the page size independently to the document setup, so in that case we could then be displaying the wrong info - is there a way to change it to display page size instead?
The other concern i would have is that the "PageSize" text variable is only updated on running the script (things such as file name update automatically) so if we amended the size, and forgot to run the script, there is a danger we could be passing on the wrong info. Don't know if this is achievable!?
-
9. Re: Display page size
Mrtreebis Aug 1, 2014 6:45 AM (in response to Jump_Over)Hi Jump_Over - yes i had wondered about whether that was a better option instead of trying to work with the existing library item - throwing out the challenge then to anyone interested!!!?
Thanks for everyones input.
-
10. Re: Display page size
Mrtreebis Aug 1, 2014 6:46 AM (in response to Mrtreebis)Apologies about the duplicate replies - new to this!


