Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

How to store stylus data such as pressure and velocity?

49 views
Skip to first unread message

Ryan

unread,
Nov 24, 2016, 6:19:17 PM11/24/16
to pdfne...@googlegroups.com
Question:

We are using a stylus to create handwritten signatures, and we would like to save the biometric information (pressure, speed…) within the PDF.

The PDF standard allows the storage of this data, but I am currently struggling how to do this with PDFNet internal methods.

Answer:

Since there is no specific support for recording pressure, speed, etc. of a pen, just the points, then you would be adding custom data.

See this section for how to add custom data to a SDF object.

So in your case, you would be adding this custom data to the Annotation or Field object. In particular you would add a sibling Dictionary object to store your data.

Obj annot_obj = annot.GetSDFObj();
Obj metrics_obj = annot_obj.PutDict("BioMetrics");
Obj velocity = metrics_obj.PutArray("Velocity");
velocity
.PushBack(value);

Reply all
Reply to author
Forward
0 new messages