How to set current comment user, protect PDF viewer

Dear supporter
I'm looking for a way to set current user - who write the comment to PDF, how to protect to let no one can comment/edit the pdf, I can not find the related document. Could you please help to give example.

Thank you very much


4 Replies

AC ArunKumar Chandrakesan Syncfusion Team August 29, 2022 04:11 PM UTC

Hi Jay,


Query: No one can comment/edit the pdf document?


You can protect the PDF document by editing annotations and form fields. To achieve this, you need to flatten the annotations and form fields on loading and should remove the annotation, form fields, and form designer modules at the user level.

For your reference, we have provided a sample below. Kindly refer to it and let us know if the solution provided is helpful to you

NOTE: Run the web service and the run the stackblitz.

StackBlitz : https://stackblitz.com/edit/react-ytqsv2?file=index.js

Web services: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Web_Service1292235708.zip



Regard,

Arun kumar



JP Jay Park replied to ArunKumar Chandrakesan August 30, 2022 03:45 AM UTC

Thank you
How about set the user to the pdf viewer component? so that in the comment section we can see who is the one commented



AC ArunKumar Chandrakesan Syncfusion Team August 30, 2022 01:04 PM UTC

Hi Jay,


Sorry, we missed that. We are analyzing how to achieve your requirement as there is no direct option to do it. We will check and update further details on September 1, 2022.


Regards,

Arun kumar



AC ArunKumar Chandrakesan Syncfusion Team September 2, 2022 10:03 AM UTC

Hi Jay,



To allow the current user to edit the PDF, you can use the author property of the annotation. Using this, you can compare with the current user and prevent the flatten option for the current user. For your reference, we have provided the screenshot and sample below, and let us know if the suggested solution was helpful to you.




StackBlitz link: https://stackblitz.com/edit/react-2w3y75-xzjsho?file=index.js


Web service: https://www.syncfusion.com/downloads/support/directtrac/general/ze/comments_for_specfic_user1362140716.zip


Regard,

Arun kumar


Loader.
Up arrow icon