When changing border style of comments using delay property in JavaScript, the change is reflected only in line comments

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

User avatar
rakunavi
User
Posts: 1735
Joined: Sat Sep 11, 2021 5:04 am

When changing border style of comments using delay property in JavaScript, the change is reflected only in line comments

Post by rakunavi »

Hello all,

There are two possible approaches to changing the comment border style by setting the dash property for annotations in JavaScript.

Code: Select all

var annots = this.getAnnots();
for (i= 0; i < annots.length; i++){
	annots[i].setProps({ style: "D", dash: [2,2] });
}

Code: Select all

var annots = this.getAnnots();
for (i= 0; i < annots.length; i++){
	annots[i].delay = true;
	annots[i].style = "D";
	annots[i].dash = [2,2];
	annots[i].delay = false;
}
  • Acrobat-PDFL SDK: JavaScript Reference > JavaScript APIs > Annotation > Annotation properties > dash
    https://opensource.adobe.com/dc-acrobat-sdk-docs/library/jsapiref/JS_API_AcroJS.html#dash
    • Acrobat-PDFL SDK: JavaScript Reference > JavaScript APIs > Annotation > Annotation properties > delay
      https://opensource.adobe.com/dc-acrobat-sdk-docs/library/jsapiref/JS_API_AcroJS.html#delay
    However, I noticed that the latter approach, using the delay property, only works correctly for line comments in PDF-XChange Editor. As shown in the video, Acrobat allows you to change the border style for all comment types with either approach.

    • sample.pdf

    PDF-XChange Editor.webm

    Acrobat.webm

    Hoping that the above information will be of some help to you.
    Thank you so much for your continued support.

    Best regards,
    rakunavi

    - PDF-XChange Editor PRO Version: 10.6.0 build 396
    - Adobe Acrobat Reader Continuous Release Version 2025.001.20531
    - OS Version: Windows 11 Pro / Home 24H2 Build 26100.4349
    - PC Model: GMKtec Nucbox M7 Pro with HUION Kamvas Pro 19 / Lenovo IdeaPad C340-15IWL
    You do not have the required permissions to view the files attached to this post.
    TOP desires for PDFXCE
    forum.pdf-xchange.com/viewtopic.php?t=39665 LassoTool
    forum.pdf-xchange.com/viewtopic.php?t=38554 CmtGarbled
    forum.pdf-xchange.com/viewtopic.php?t=37353 FulScrMultiMon
    forum.pdf-xchange.com/viewtopic.php?t=41002 DisableTouchSelect
    User avatar
    Daniel - PDF-XChange
    Site Admin
    Posts: 11292
    Joined: Wed Jan 03, 2018 6:52 pm

    Re: When changing border style of comments using delay property in JavaScript, the change is reflected only in line comm

    Post by Daniel - PDF-XChange »

    Hello, rakunavi

    Thank you for the report, I have passed this along for review.

    Kind regards,
    Dan McIntyre - Support Technician
    PDF-XChange Co. LTD

    +++++++++++++++++++++++++++++++++++
    Our Web site domain and email address has changed as of 26/10/2023.
    https://www.pdf-xchange.com
    Support@pdf-xchange.com