Copy link to clipboard
Copied
Hello-
I am looking for a way to add a PDFs trim box dimensions as a caption using a script or text variable.
Final Goal: I have to create a multipage production proof that includes an image of each document being printed and include the dimensions of that document for the pressman to reference. I have a job with over 100 pieces of artwork and need a way to reduce the amount of time it takes to create the production proof.
Here's a more simplified version. Create a text frame and select it with your black arrow. Then run this script. To install the script, read here: https://indesignsecrets.com/how-to-install-a-script-in-indesign-that-you-found-in-a-forum-or-blog-post.php
var doc = app.activeDocument;
var label = "";
with (doc.documentPreferences) {
label += "WxH: " + pageWidth + "x" + pageHeight;
}
var tf = app.selection[0];
tf.contents = label;
Copy link to clipboard
Copied
Can you define further what you mean by the trim area? Do you need the document's height and width, as well as the bleed? Or just the location of a placed PDF on an InDesign page? Do the documents have multiple pages, and are all page dimensions the same? This is how you would get the document dimensions and bleed settings into a document label, which you can then script to populate in a textframe called "Slug" (you can name Text Frames in your Layers palette).
var doc = app.activeDocument;
var label = doc.label;
with (doc.documentPreferences) {
label += "WxH: " + pageWidth + "x" + pageHeight + "\n";
label += "Bleed (top, bottom, left, right): ";
label += documentBleedTopOffset + ", ";
label += documentBleedBottomOffset + ", ";
label += documentBleedInsideOrLeftOffset + ", ";
label += documentBleedOutsideOrRightOffset + "\n";
}
var tf = doc.textFrames.itemByName("Slug");
tf.contents = label;
There are, of course, ways to do this to all documents in a given folder, or all open docs, etc.
Copy link to clipboard
Copied
Hello!
Yes, I need the document;s height and width without bleed. I do not need the location of the placed PDF. The PDFs only have one page.
Also I am new to the whole scripting thing for Indesign. Soo...I have no clue what to do with the code that you included. Do you have a resource that can point me in the right direction ?
Thanks
Copy link to clipboard
Copied
Here's a more simplified version. Create a text frame and select it with your black arrow. Then run this script. To install the script, read here: https://indesignsecrets.com/how-to-install-a-script-in-indesign-that-you-found-in-a-forum-or-blog-po...
var doc = app.activeDocument;
var label = "";
with (doc.documentPreferences) {
label += "WxH: " + pageWidth + "x" + pageHeight;
}
var tf = app.selection[0];
tf.contents = label;