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

Quick way of showing the trim size in Acrobat Reader and Pro

Community Beginner ,
Nov 07, 2017 Nov 07, 2017

Copy link to clipboard

Copied

I entered this as an answer to a question elsewhere but I suppose this is something many would like to know since there's no good built-in way to do it. So here it is again:

What you need to do is to add a simple javascript to Acrobat that creates a new meny option. Here's how:

Open a text editor and paste this into it:

function PageSize(){

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");

}

app.addMenuItem ({cName: "Show trim size", cParent: "File", cExec: "PageSize()" });

Then you save the file as something like trimsize.js on your desktop or elsewhere.

Then open in Windows:

C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\Javascripts\

and copy the file there. You might have to allow it to copy as administrator.

After this you restart Acrobat, and at the bottom of the file menu you will find a new option for showing the trim size.

The path will be a little different if you're using Acrobat Pro or if you're on a Mac but I'm sure you can find it.

Mac path:

/Applications/Adobe Acrobat DC/Adobe Acrobat.app/Contents/Resources/JavaScripts/

The nice thing about this script is that it works for Acrobat Reader as well as Pro. In my company the sales people use Reader and don't have access to the trim size at all, so this was very nice for them to have.

Hope you like it and that my little script works for you.

TOPICS
Print and prepress

Views

7.5K

Likes

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 ,
Nov 08, 2017 Nov 08, 2017

Copy link to clipboard

Copied

I didn't try this out, as I do not have admin rights on this PC, but it looks promising. I would just change one thing: as the user can set unit preference, you surely have the possibility to query this preference and to use this for showing the trim size. It's definitely a nice one then.

I suppose it works also with crop, art and bleed.

ABAMBO | Hard- and Software Engineer | Photographer

Likes

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
LEGEND ,
Apr 26, 2018 Apr 26, 2018

Copy link to clipboard

Copied

You can place the file in the user's JavaScript folder. SinC:\Users\George\AppData\Roaming\Adobe\Acrobat\Privileged\DC\JavaScriptsce this is your user folder, you will have rights to it.

:\Users\[userid]\AppData\Roaming\Adobe\Acrobat\Privileged\DC\JavaScripts

Be sure to replace [userid] with your user ID.

This could be easily modified to show result in inches. One could also move the menu option to the "View" option.

Likes

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 ,
Apr 26, 2018 Apr 26, 2018

Copy link to clipboard

Copied

This could be easily modified to show result in inches. One could also move the menu option to the "View" option.

Nice suggestion, I agree that the VIEW menu is probably a better place for this than the FILE menu (which is a safe choice as it is not likely to be renamed by Adobe, not that they have renamed or done away with the View menu yet).

Yes, as mentioned in that other post simply changing 0.3528 to 0.0138889 should do the trick. One can also elect to remove rounding, leave it on (13 places or something like that) or round to a smaller set number of decimal places.

Keep in mind that this script is simple in that it only appears to report the values for the first page in the file, it does not dynamically adjust the report based on the current active page or offer a page selection option etc.

Likes

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 ,
Apr 29, 2018 Apr 29, 2018

Copy link to clipboard

Copied

An improvement to the previous code… This new code will show the pagebox info for the current active page! The previous code only showed the first page data.

The key addition being the inclusion of this.pageNum

function ThePageSize(){

var aRect = this.getPageBox("Crop",this.pageNum);

var aWidth = aRect[2] - aRect[0];

var aHeight = aRect[1] - aRect[3];

var bRect = this.getPageBox("Art",this.pageNum);

var bWidth = bRect[2] - bRect[0];

var bHeight = bRect[1] - bRect[3];

var cRect = this.getPageBox("Trim",this.pageNum);

var cWidth = cRect[2] - cRect[0];

var cHeight = cRect[1] - cRect[3];

var dRect = this.getPageBox("Bleed",this.pageNum);

var dWidth = dRect[2] - dRect[0];

var dHeight = dRect[1] - dRect[3];

var eRect = this.getPageBox("Media",this.pageNum);

var eWidth = eRect[2] - eRect[0];

var eHeight = eRect[1] - eRect[3];

app.alert("Crop: " + Math.round(aWidth*0.3528*100)/100 + " mm x " + Math.round(aHeight*0.3528*100)/100 + " mm" + "\n\n" +

  ("Art: " + Math.round(bWidth*0.3528*100)/100 + " mm x " + Math.round(bHeight*0.3528*100)/100 + " mm") + "\n\n" +

  ("Trim: " + Math.round(cWidth*0.3528*100)/100 + " mm x " + Math.round(cHeight*0.3528*100)/100 + " mm") + "\n\n" +

  ("Bleed: " + Math.round(dWidth*0.3528*100)/100 + " mm x " + Math.round(dHeight*0.3528*100)/100 + " mm") + "\n\n" +

  ("Media: " + Math.round(eWidth*0.3528*100)/100 + " mm x " + Math.round(eHeight*0.3528*100)/100 + " mm")

);

}

app.addMenuItem ({cName: "Show PageBox Sizes", cParent: "View", cExec: "ThePageSize()" });

Likes

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 ,
Apr 29, 2018 Apr 29, 2018

Copy link to clipboard

Copied

Adding a current page and total page label:

numPages.png

function ThePageSize(){

var aRect = this.getPageBox("Crop",this.pageNum);

var aWidth = aRect[2] - aRect[0];

var aHeight = aRect[1] - aRect[3];

var bRect = this.getPageBox("Art",this.pageNum);

var bWidth = bRect[2] - bRect[0];

var bHeight = bRect[1] - bRect[3];

var cRect = this.getPageBox("Trim",this.pageNum);

var cWidth = cRect[2] - cRect[0];

var cHeight = cRect[1] - cRect[3];

var dRect = this.getPageBox("Bleed",this.pageNum);

var dWidth = dRect[2] - dRect[0];

var dHeight = dRect[1] - dRect[3];

var eRect = this.getPageBox("Media",this.pageNum);

var eWidth = eRect[2] - eRect[0];

var eHeight = eRect[1] - eRect[3];

var pageLabel = this.pageNum + 1;

var totalPages = this.numPages;

app.alert("Page: " + pageLabel + " of " + totalPages + " pages" + "\n\n" + ("Crop: " + Math.round(aWidth*0.3528*100)/100 + " mm x " + Math.round(aHeight*0.3528*100)/100 + " mm" + "\n\n" + ("Art: " + Math.round(bWidth*0.3528*100)/100 + " mm x " + Math.round(bHeight*0.3528*100)/100 + " mm") + "\n\n" + ("Trim: " + Math.round(cWidth*0.3528*100)/100 + " mm x " + Math.round(cHeight*0.3528*100)/100 + " mm") + "\n\n" + ("Bleed: " + Math.round(dWidth*0.3528*100)/100 + " mm x " + Math.round(dHeight*0.3528*100)/100 + " mm") + "\n\n" + ("Media: " + Math.round(eWidth*0.3528*100)/100 + " mm x " + Math.round(eHeight*0.3528*100)/100 + " mm")

));

}

app.addMenuItem ({cName: "Show PageBox Sizes", cParent: "View", cExec: "ThePageSize()" });

Likes

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
Explorer ,
Oct 14, 2018 Oct 14, 2018

Copy link to clipboard

Copied

Nothing written here does not work.

Even though I tried different operating systems.

It just does not appear in the Acrobat.

If something can send me a ready script that works - I'll thank him.

Likes

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
LEGEND ,
Oct 14, 2018 Oct 14, 2018

Copy link to clipboard

Copied

I have no issue with the script in Windows 10 and both Acrobat DC and Reader DC. You may need to adjust the location of the scripts since the user's folder will change by version of Acrobat/Reader. Note you will need to have a PDF open for this script to work.

You could even add the code to a button action and remove the "addMenuItem" line and enter "PageSize();" in its place.

The code for you mouse up action would look like:

function PageSize(){

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");

return;

PageSize();

Likes

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
Explorer ,
Oct 14, 2018 Oct 14, 2018

Copy link to clipboard

Copied

Please see the attached files.

Maybe I mada a mistake.

It does not work.

Thanks!

Likes

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 ,
Oct 14, 2018 Oct 14, 2018

Copy link to clipboard

Copied

Are you Windows or Mac OS based? The file should have a .js extension (not .jsx)

Windows OS 64bit Installation Path:

C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\Javascripts

Mac OS Installation Path:

Contextual/right click on the “Adobe Acrobat Reader DC.app” application and select “Show Package Contents” and drop the script into the

Applications/Adobe Acrobat Reader DC.app/Contents/Resources/JavaScripts folder.

Restart Acrobat Reader and you will find the script listed at the foot of the File or View menu as “Show TrimSize Box” (depending on code).

Likes

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
Explorer ,
Oct 14, 2018 Oct 14, 2018

Copy link to clipboard

Copied

Please see the attached file.

Maybe I mada a mistake.

It does not work.

Thanks!

Likes

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 ,
Oct 14, 2018 Oct 14, 2018

Copy link to clipboard

Copied

Nothing attached, you’ll either need to copy/paste the text or supply a file sharing website download link such as from WeTransfer, DropBox, MS OneDrive, Google Drive etc.

Likes

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
Explorer ,
Oct 14, 2018 Oct 14, 2018

Copy link to clipboard

Copied

https://www.dropbox.com/s/fzln45u3x0indye/Screen%20Shot%202018-10-15%20at%2007.11.00.jpg?dl=0

Likes

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 ,
Oct 14, 2018 Oct 14, 2018

Copy link to clipboard

Copied

The JavaScript Debugger errored on the code from post #10, I believe that a closing } is required at the end of the code.

My post #8 works.

That being said, I don’t know how to run that script if not executed from a menu, not exactly sure what the “mouse up” action is… I tried a right click?

Likes

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
Explorer ,
Oct 14, 2018 Oct 14, 2018

Copy link to clipboard

Copied

Please send me the js file.

נשלח מה-iPhone שלי

‫ב-15 באוק׳ 2018, בשעה 8:22, ‏‏Stephen_A_Marsh ‏<forums_noreply@adobe.com> כתב/ה:‬

Quick way of showing the trim size in Acrobat Reader and Pro

created by Stephen_A_Marsh in Printing & Prepress - View the full discussion

The JavaScript Debugger errored on the code from post #10, I believe that a closing } is required at the end of the code.

That being said, I don’t know how to run that script if not in a menu, not exactly sure what the button is?

If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/10677784#10677784 and clicking ‘Correct’ below the answer

Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:

Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/10677784#10677784

To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"

Start a new discussion in Printing & Prepress by email or at Adobe Community

For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624.

This email was sent by Adobe Community because you are a registered user.

You may unsubscribe instantly from Adobe Community, or adjust email frequency in your email preferences

Likes

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 ,
Oct 15, 2018 Oct 15, 2018

Copy link to clipboard

Copied

It is/should be exactly the same as posted to the forum above, however just in case:

Dropbox - viewALLPAGEBOXsizes-Rounding2places.js

Likes

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
Explorer ,
Oct 15, 2018 Oct 15, 2018

Copy link to clipboard

Copied

Hi.


thanks!!


it works!


Probably after  I save - through the "text edit" - the js file is damaged

I have a request.

Can you please download everything and display only the trimsize?

And for my manager to be easy - do not write trimsize

But rather: "The size of the work:"

Screen Shot 2018-10-15 at 20.17.42.jpg

Likes

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 ,
Oct 15, 2018 Oct 15, 2018

Copy link to clipboard

Copied

aviel222  – If I understand your request correctly, you would like something like this (rounding the size to two decimal places)?

work-size.png

DOWNLOAD LINK:

Dropbox - viewTRIMBOXsize-Rounding2places_EDITED.js

function ThePageSize(){

var Rect = this.getPageBox("Trim",this.pageNum);

var Width = Rect[2] - Rect[0];

var Height = Rect[1] - Rect[3];

var pageLabel = this.pageNum + 1;

var totalPages = this.numPages;

app.alert("Page: " + pageLabel + " of " + totalPages + " pages" + "\n\n" + ("The size of the work: " + Math.round(Width*0.3528*100)/100 + " mm x " + Math.round(Height*0.3528*100)/100 + " mm"));

}

app.addMenuItem ({cName: "Show Work Size", cParent: "View", cExec: "ThePageSize()" });

P.S. For what it is worth, the text encoding for this script plain text file is Unicode (UTF-8) with Unix LF line endings.

Likes

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
Explorer ,
Oct 16, 2018 Oct 16, 2018

Copy link to clipboard

Copied

Thank you!!!!

I have another request from you, a little more complicated.

I'm just a little busy for the next few days.

I'll explain to you soon-maybe you'll have an idea for me.

Nice week!

Likes

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
Explorer ,
Oct 16, 2018 Oct 16, 2018

Copy link to clipboard

Copied

In the window,

Can you delete the numbers after the point?

Likes

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 ,
Oct 16, 2018 Oct 16, 2018

Copy link to clipboard

Copied

Sure, however rounding to the integer may be problematic in certain cases, so one or two decimal precision is generally preferred:

function ThePageSize(){

var Rect = this.getPageBox("Trim",this.pageNum);

var Width = Rect[2] - Rect[0];

var Height = Rect[1] - Rect[3];

var pageLabel = this.pageNum + 1;

var totalPages = this.numPages;

app.alert("Page: " + pageLabel + " of " + totalPages + " pages" + "\n\n" + ("The size of the work: " + Math.round(Width*0.3528) + " mm x " + Math.round(Height*0.3528) + " mm"));

}

app.addMenuItem ({cName: "Show Work Size", cParent: "View", cExec: "ThePageSize()" });

https://www.dropbox.com/s/sj41jibv1fm5jlr/viewALLPAGEBOXsizes-Rounding.js?dl=0

Likes

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
Explorer ,
Oct 17, 2018 Oct 17, 2018

Copy link to clipboard

Copied

Hi.

I have a little complicated question.

I have a 50 * 90 mm business card

And I want to duplicate it so that it goes into the page (through the "quite imposing" plug-in).

After the duplication I created a new sheet with 24 tickets,

I want the top corner of the sheet to say "trim size"

So that the employee who cuts the cards knows what final size he needs to cut it.

How can I do it?

Please note that I have licenses for pitstop and for quite imposing

But none of them knew how to give me an automatic solution. (In pitstop you can paste the trim size on the document But after imputation the number is deleted.)

It's clear to me that I can always type manually but I'm looking for an automated script.

It is important to emphasize that each time the size of the card varies from work to work.

Attached file with the target.

Thanks!

Likes

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 ,
Oct 17, 2018 Oct 17, 2018

Copy link to clipboard

Copied

I would suggest that you repost your question as a new topic as it has moved beyond the current thread.

P.S. There are no attachments, you would need to upload the original 1up and the final 24up impo to a file sharing site and post the links.

Likes

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
Explorer ,
Oct 17, 2018 Oct 17, 2018

Copy link to clipboard

Copied

Thanks.

Is there a way - using an automated script - to export the trimsize

To pdf?

Or is it possible to give a script that the computer will copy the trimsize to the clipboard?

Likes

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 ,
Oct 17, 2018 Oct 17, 2018

Copy link to clipboard

Copied

There are multiple possibilities, either in Acrobat scripting, PitStop Pro/Server etc. But again, starting a new topic thread would be best.

Likes

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