19 Replies Latest reply: Jun 19, 2012 11:29 AM by jayshakir RSS

    How to move a picture in a pdf?

    jayshakir Community Member

      I want to move a picture in a pdf in 3 possible specific locations.

       

      I tried these:-

      1) created a picture, by creating a button and setting an image button on it, but then i did not find commands to move the button

      So if you could give me commands to move a button, that will be great.

       

      I tried something else.

       

      2) i put the button in all the locations but removed the icon from it, so it looks empty.

      at run time i apply the image name on one of the 3 buttons, thus it looked like the button moves from one of the three locations to the other.

      eg:-

      button1.image="";

      button2.image="img.jpg";

      button3.image="";

       

      thus it looks like the iamge moved from location 1 or 3 to 2.

       

      i tried using this command to dynamically set the image of an icon which initially has no image, but it does not work

       

      IAFormApp formApp;

      IFields myFields = (IFields)formApp.Fields;

      IEnumerator myEnumerator = myFields.GetEnumerator();

       

      while (myEnumerator.MoveNext())

      {

          myField = (IField)myEnumerator.Current;

          if (myField.Name=="btnPage4L")

                  myField.SetButtonIcon("",@"C:\ACK-SDK\colorrisk.jpg",4);

      }

       

      There is no documentation at all on the SetButtonIcon, not in the SDK and not on the internet.