These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Checking color of any element on page (drawings, fields, text, images)

OliWan
Registered: Apr 29 2009
Posts: 5

Dear Acrobat Gurus,

is it possible to check any occuring color onto a page usign javascript
within acrobat 8.0 ?

Within one of ore print jobs it is "forbidden" to have any black color within
a pdf. I want to check the content colors and show up an alert message if
any of the occuring elements has got the color black.

Within the web i only can find a loop for checking color of field with getField()
but none of them shows me how to walk through any outher element which is part
of the page like drawings, lines, images and so on.

Is there a way the get any different content types and check them ?
What kind of content can i grap as child of page object?
Perhaps i need to use the document object -> this.lines, this.images, this......?

Hope for hint and until best wishes to all of you

may the force be with you
OliWan

My Product Information:
Acrobat Pro 8.0, Windows
UVSAR
Expert
Registered: Oct 29 2008
Posts: 1357
That's what the preflight and output preview panels are for.

You could in theory use JS to trawl through all the native page objects (text, etc.) but there's no practicable way with scripting to get inside an image and check all the pixels, or work out if different items your four plates happen to overlap and form a black area.
OliWan
Registered: Apr 29 2009
Posts: 5
... ok - thanks for those facts...

Perhaps you can give me short answers for ...:

Is there a tutorial avaialbe which explains, how to check for a generic color like color.black with
a pdf document?
Is it possible to call a preflight check via javascript?

Greets
OliWan