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

GetJSObject throws Value does not fall within the expected range

Guest
Oct 05, 2016 Oct 05, 2016

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

TOPICS
Acrobat SDK and JavaScript
1.2K
Translate
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 05, 2016 Oct 05, 2016

Is color.blue a function? I'd expect it to be a property.

Translate
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
Guest
Oct 05, 2016 Oct 05, 2016

Hi,

FYI, even as a property it gives the same error

Thanks

Translate
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
Guest
Oct 05, 2016 Oct 05, 2016

The same is likely to appear for

jsObj.addWatermarkFromFile(..parametrs)

Translate
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 05, 2016 Oct 05, 2016

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.

Translate
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
Guest
Oct 06, 2016 Oct 06, 2016

i tired it as variant also, and as i already mentioned the same issues occurs with addWatermarkFromFile() and AddAnnot

Translate
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 06, 2016 Oct 06, 2016
LATEST

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...

Translate
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