Add PageBox to Document Info Metadata
I would like to add say the Media Box or Trim Box info to the document info metadata, such as title or subject.
It is apparently very easy to add a static string to the document metadata, such as:
this.info.subject = "My Text String"; // adds text string to the document subject metadata
As a newb to scripting, I am having problems adding a variable based off the required page box rather than a hard coded string of static text.
This topic thread is a good example of what I would like to add to the metadata:
function ThePageSize(){
var aRect = this.getPageBox("Trim");
var width = aRect[2] - aRect[0];
var height = aRect[1] - aRect[3];
app.alert("Trim: " + Math.round(width*0.3528) + " mm x "
+ Math.round(height*0.3528) + " mm");
}
Line 5 where it pulls in the bounding size and converts it to metric with some static text is what I would like to add to the metadata.
I’m sure that I am missing something basic and I have not been able to find any examples to adapt. Can anybody please point me in the right direction?

