Copy link to clipboard
Copied
Hi,
i am facing the issue "Value does not fall within expected range" with GetJSObject using c#
facing issue at below LOC
object oColor = jsObj.color.blue();
Any help would be greatly appreciated
Thanks
Copy link to clipboard
Copied
Is color.blue a function? I'd expect it to be a property.
Copy link to clipboard
Copied
Hi,
FYI, even as a property it gives the same error
Thanks
Copy link to clipboard
Copied
The same is likely to appear for
jsObj.addWatermarkFromFile(..parametrs)
Copy link to clipboard
Copied
As was already mentioned, blue is not a method, it's a property. The type of a color is not an object - it's a Variant() with a number of elements. The first element is always the name, followed by one or more Double values for grayscale/RGB/CMYK values.
Copy link to clipboard
Copied
i tired it as variant also, and as i already mentioned the same issues occurs with addWatermarkFromFile() and AddAnnot
Copy link to clipboard
Copied
When you try something and it still doesn't work, please post the code and copy/paste the error message from the JavaScript console. We can't know what you are trying. Certainly, there are problems passing particular types of parameter which nobody has ever posted a solution to, but we can't know what applies to you if you don't show your workings out...
Find more inspiration, events, and resources on the new Adobe Community
Explore Now