How to draw lines fixed to be horisontal or vertical?

Hi,

How can I make a custom toolbar having with button to activate drawing line-annotations which a forced to be horisontal or vertical, both not any other angle ?

Please advise.

Best regards,


6 Replies

VS Vikas Sekar Syncfusion Team November 2, 2020 07:21 PM UTC

Hi Johannes, 

Thanks for contacting Syncfusion support. 

Currently in PdfViewer, we don’t have support to draw line specifically as horizontal or vertical. On analyzing your requirement, it was similar to “Draw a line that’s horizontal, vertical, or at a 45° angle by pressing Shift in Adobe”. Will you please confirm us on this whether this helps your requirement, which would help us to proceed further? 

Regards, 
Vikas   



MR MrHessellund November 2, 2020 07:30 PM UTC

Hi Vikas,

Exactly, my request is the same as by pressing shift in Adobe Reader.

However, I would like create a button which activates such mode even without pressing shift.

Best regards,



VS Vikas Sekar Syncfusion Team November 3, 2020 09:23 AM UTC

Hi Johannes, 

Thank you for confirming the feature and provided details on your requirement. 

At present, we do support draw only free line annotations to any angle based on the pointer moves and we do not have specific modes to control the angle for drawing the fixed straight lines. We have logged a feature request for “Support to draw fixed straight lines horizontally and vertically”. When implementing the feature, we will consider providing the necessary APIs to activate the mode as per your requirement. 

We do not have any immediate plans to implement this feature. At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technological feasibility, and customer interest. We will let you know when this feature is implemented. 

You can now track the status of this feature request here,  
  
Regards,  
Vikas 



MR MrHessellund January 10, 2021 08:09 AM UTC

Hi,

When is this expected to be implemented?

Any workarounds ?

Best regards,



DD Divya Dhayalan Syncfusion Team January 11, 2021 07:05 PM UTC

Hi Johannes, 
 
Currently we are checking on the possibilities for the workaround and we will update further details about the feature implementation and workaround on 13th January 2021. 
 
Regards, 
Divya 



DD Divya Dhayalan Syncfusion Team January 13, 2021 03:21 PM UTC

Hi Johannes, 
 
At present we do not have any immediate plans to implement the feature “Support to draw fixed straight lines horizontally and vertically”. We will let you know when this feature is implemented. You can now track the status of this feature request here,   
 
We have created a workaround to achieve the requirement “Draw lines horizontally or vertically”, by correcting the drawn line in PDF Viewer to straight from code behind and reloading the document. Once a line is drawn, the points are obtained from the ShapeAnnotationChanged event. The points will be corrected, and a new straight-line annotation will be created. It will be added to the PdfLoadedDocument object and the annotation will be reloaded to the control.  
 
Please download the workaround sample from the below location, 
 
Please let us know if this solution helps you. 
 
Regards, 
Divya 


Loader.
Up arrow icon