Hi,
The target is to add a textFrame with centered page number out under every page. I know can do it with master pages but don't want to affect. It's only for printing proofs.
How to center page number into textFrame?
Can anyone help me to complete this script?
Thanks a lot
Mario
var doc = app.activeDocument;
var myRuler = doc.viewPreferences.rulerOrigin;
doc.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.millimeters;
doc.viewPreferences.verticalMeasurementUnits = MeasurementUnits.millimeters;
doc.documentPreferences.slugTopOffset = 15;
doc.documentPreferences.documentSlugUniformSize = true;
doc.viewPreferences.rulerOrigin = RulerOrigin.PAGE_ORIGIN;
doc.zeroPoint = [0,0];
var vmu = doc.pages[0].bounds[2];
var hmu = doc.pages[0].bounds[3];
for (i = 0; i < doc.pages.length; i++) {
doc.pages[i].textFrames.add().properties = {
geometricBounds : [ (vmu + 5),0,(vmu + 15),hmu ],
strokeWidth : 0,
fillColor : "None",
contents : SpecialCharacters.AUTO_PAGE_NUMBER,
// justification = Justification.CENTER_ALIGN, //no error msg with this line but no result
}
};
doc.viewPreferences.rulerOrigin = myRuler;