Set the rectangle (rect) of the field.
sir thanks but can you be a bit more detailed in more than 5 words.
any command or example from the sdk that i could see?
i need to do either of he 2 examples above, either to move the location or pics or to make pics visible/invisible.
Offhand, I don’t know if there is an example or not in the SDK.
But just read the SDK documentation – this is pretty simple.
can you let me know why the
commands to dynamically assign the filename to the button is not
working with "SetButtonIcon" command?
it gives error, there are no examples on this in the SDK, nor is there anything on the net.
sorry, but i am really stuck on this, can someone help me please.
how can i move an image
or how can i dynamically set the image of a control at run time
sir, i still dont see any documntation on this. how do i dynamically assign a picture to a button?
the .SetButtonIcon() command is giving an error.
setButtonIcon() is the right JS method.
1) there is no documentation on it
2) there are no examples
3) the command gives an error
4) there is no info on it in the entire internet
it is strange, because i am getting "out of index range error", the only number used in the parameters is the last parameter which is page number, i gave numbers from -1 to all numbers, i still get the error.
In the Plugin API, all API calls start with the two or three letters for their layer (AV, PD, Cos etc.) Since SetButtonIcon doesn’t have one, I can safely infer that it is NOT a plugin API call.
i dont know what you mean by api and non-api. when i type MYFIELD., i get a drop down of command and SetButtonIcon() is one of them
look at the below code and let me know why it gives error?
IFields myFields = (IFields)formApp.Fields;
IEnumerator myEnumerator = myFields.GetEnumerator();
myField = (IField)myEnumerator.Current;
1 person found this helpful
OK – that’s the COM/.NET APIs.
For that API, you can only specify a PDF file for the icon of a button. I believe that is mentioned in the documentation.
yes okay, if you call it the COM/.NET API, yes that is it, so if i convert the jpg to a pdf, then i can use it as the parameter?
I have never seen SetButtonIcon.
yes that is what im talking about Bernd, there is no documentation or example on it. Try using the code i gave above and you will get this method, however it does not work.
i gave the name of the file as a pdf instead of a jpg, it still doesnt work with page # as 0 or 1 or 6...
Based on the code that you've posted, and your question, it sounds like
you've never read the documentation. The Acrobat API is not "discoverable",
you need to read the documentation that comes with it. Take a look at this
- it describes the SetButtonIcon function and it lists what the three
parameters are supposed to be. In your sample code, you are passing in an
empty string as the first parameter. That may work (I don't know if it
does), but even if it does, that would be undocumented behavior. You need
to supply one of the codes listed in the documentation. Also, the last
parameter is the page number that is retrieved from the PDF file to be used
as your button image. Even if you could use a JPEG file, the value "4"
would definitely be wrong.
So please read the documentation that comes with the API, it will save you
a lot of time and frustration.
Karl Heinz Kremer
PDF Acrobatics Without a Net
yes it was the combination of 2 things, the first parameter has to be a code N or D or R
and the second is the image which must be a pdf and not jpg, LRosenth had mentioned that earlier
once i saw it was working i looked above and said "im ready, you can take me now, it is finished..."
thank you all Karl, LRosenth, Bernd