Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF

TOPIC:

Ink Annotation 7 years 4 months ago #11514

  • mrawy
  • mrawy's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 20
  • Thank you received: 0
How i can do this using 3.8 version ?
Kindly Advise.

Please Log in or Create an account to join the conversation.

Last edit: by mrawy.

Ink Annotation 7 years 4 months ago #11515

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
I suggest you to check the Ink.java class and this method : www.radaeepdf.com/documentation/javadocs...on.html#GetInkPath--
If this is not what you wanted, can you please better explain your needs?

Please Log in or Create an account to join the conversation.

Ink Annotation 7 years 4 months ago #11516

  • mrawy
  • mrawy's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 20
  • Thank you received: 0
I'm storing the Ink points(Path points) out of the PDF file and i can redraw the Ink on PDF file using this points.
The problem is: I don't know how i can update this points when the user moves the Ink annotation.
Here is what i have:
- An array of points. Point object contains (Float)X, (Float)Y and (Integer)Type.
What i want:
- I want to create a new Path object using this points. So i can call this method Page.Annotation.SetInkPath(path);

Please Log in or Create an account to join the conversation.

Ink Annotation 7 years 4 months ago #11521

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
when the user moves the Ink annot you have to recall the GetInkPath() method and re-save the new points, so you will get the new correct position of the Ink.

Please Log in or Create an account to join the conversation.

Ink Annotation 7 years 4 months ago #11523

  • mrawy
  • mrawy's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 20
  • Thank you received: 0
I want to update the Ink Path for an old Ink Annotation that exist on another copy of the PDF file. So suppose that i have an array of points (from path object) and i have the target annotation(InkAnnotation). How i can update the path for an old(created before) ink annotation ? I know that i can use this method InkAnnotation.SetInkPath(Path path). How i can create the path object from an array of points ?

Please Log in or Create an account to join the conversation.

Last edit: by mrawy.

Ink Annotation 7 years 4 months ago #11527

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
You need to do something like the code below, using the info you have (loop on your array and based on the type use MoveTo, LineTo, ...):
Path path1 = new Path();
 path1.MoveTo(0, 0);
 path1.LineTo(320, 0);
 path1.LineTo(320, 100);
path1.LineTo(0, 100);
 path1.ClosePath();

Check also Ink.OnDraw

Please Log in or Create an account to join the conversation.

Last edit: by nermeen.
Powered by Kunena Forum