Copy link to clipboard
Copied
Hi - I have a PDF form where we have a few ink annotations that are programmatically added via javascript a based on a save trigger. I noticed after the recent adobe upgrades that the edges are now rounded on the gestures which is causing a problem with some of our systems that read the documents. Does anyone have any ideas on why this is happening or how to fix?
Current/post-upgrade:
Previous/pre-upgrade:
Ideally the line ending shape would be set with a property, such as the lineEnding property.
But, the documentation indicates that it does not apply to the ink annot, not that the documentation has much meaning on this issue, but I believe this is a change in how the ink annot works and there isn't a setting for it
https://opensource.adobe.com/dc-acrobat-sdk-docs/library/jsapiref/JS_API_AcroJS.html#lineending
Copy link to clipboard
Copied
Just for my clarification - is this a pencil/drawing annotation? I tried to create one manually, and I get a rounded line endcap that way.
Dave
Copy link to clipboard
Copied
Hi Dave - thank you for the response. The type of annotation is Ink and I'm drawing within the annotation using the 'gestures' variable. An example is below. I'm seeing the rounded line endcaps now too but am trying to see if I can get it to display with the flat endcap again.
var gestureArr = new Array();
gestureArr[0] = [100,100];
gestureArr[1] = [110,100];
console.println(points);
this.addAnnot({
type: "Ink",
page: 0,
gestures: [gestureArr],
strokeColor: color.red,
width: 1
})
Copy link to clipboard
Copied
quick correction to the code snipped - I had some debugging in there.
var gestureArr = new Array();
gestureArr[0] = [100,100];
gestureArr[1] = [110,100];
this.addAnnot({
type: "Ink",
page: 0,
gestures: [gestureArr],
strokeColor: color.red,
width: 1
});
Copy link to clipboard
Copied
Ideally the line ending shape would be set with a property, such as the lineEnding property.
But, the documentation indicates that it does not apply to the ink annot, not that the documentation has much meaning on this issue, but I believe this is a change in how the ink annot works and there isn't a setting for it
https://opensource.adobe.com/dc-acrobat-sdk-docs/library/jsapiref/JS_API_AcroJS.html#lineending
Copy link to clipboard
Copied
Thank you for the response. Yeah it looks like that is the case. Hopefully there is an undocumented way to set the lineEndings in the gestures or this gets reverted/configurable in the next update.