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

Javascript to show color separtions used on the document

New Here ,
Mar 11, 2021 Mar 11, 2021

Copy link to clipboard

Copied

Hi, 

I used the javascript below (Stephen_A_Marsh's script from https://community.adobe.com/t5/acrobat/quick-way-of-showing-the-trim-size-in-acrobat-reader-and-pro/...) to display a popup showing the Trim Size and Media Size of the document.

 

function ThePageSize(){
var cRect = this.getPageBox("Trim",this.pageNum);
var cWidth = cRect[2] - cRect[0];
var cHeight = cRect[1] - cRect[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" + ("Trim: " + Math.round(cWidth*0.3528*100)/100 + " mm x " + Math.round(cHeight*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()" });

Screen Shot 2021-03-12 at 3.24.36 pm.png

 

Is there a way where I can add color separtion used on the document to the alert box above?. 

That is display the color separtion as below which shows the number of types of colors used CMYK and Spot Colors?

Screen Shot 2021-03-12 at 3.18.10 pm.png

Thanks

 

 

 

TOPICS
JavaScript

Views

298

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

correct answers 1 Correct answer

LEGEND , Mar 12, 2021 Mar 12, 2021

That information is not available to JavaScript.

Votes

Translate

Translate
LEGEND ,
Mar 12, 2021 Mar 12, 2021

Copy link to clipboard

Copied

That information is not available to JavaScript.

Votes

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 ,
Mar 12, 2021 Mar 12, 2021

Copy link to clipboard

Copied

LATEST

"Is there a way where I can add color separtion used on the document "

A PDF is not an AI file, in a PDF there is no one color separation used on the document, each object is independent and has its own characteristics.

 

You can find informations about all color modes and separations used in the document in : Acrobat Pro : Print Production : Convert Colors

 

Capture_025.png

Votes

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