We are not able to get Angle rotation value after performing rotation in web document viewer

Questions, comments and suggestions concerning VintaSoft Imaging .NET SDK.

Moderator: Alex

Post Reply
jwalit.katira
Posts: 31
Joined: Mon Sep 18, 2023 1:41 pm

We are not able to get Angle rotation value after performing rotation in web document viewer

Post by jwalit.katira »

Hello ,
When we are trying to rotate single page using setCustomImageRotationAngle() method, it is working fine but after when we trying to get current angle, it is not giving correct angle value (it is giving us 0 value always but it suppose to give us 90 value)

Below is the code

Code: Select all

let FocusedIndexvalue; // Type: number
      FocusedIndexvalue = imageViewer.get_FocusedIndex();
      let ImageRotationAngle = imageViewer.get_ImageRotationAngle();
      console.log(ImageRotationAngle); // This suppose to be latest value (eg : 90)
      let test = ImageRotationAngle + 90;
      console.log(test); 
      imageViewer.setCustomImageRotationAngle(FocusedIndexvalue, test);
      imageViewer.set_FocusedIndex(FocusedIndexvalue);
So could you please provide solution

Thanks
Jwalit Katira
Alex
Site Admin
Posts: 2319
Joined: Thu Jul 10, 2008 2:21 pm

Re: We are not able to get Angle rotation value after performing rotation in web document viewer

Post by Alex »

Hello Jwalit,

The WebImageViewerJS.get_ImageRotationAngle function returns the rotation angle, in degrees, for all images in image viewer.

The WebImageViewerJS.setCustomImageRotationAngle function sets the custom rotation angle, in degrees, for single image in image viewer. Image viewer does not rotate image with custom rotation angle when value of "set_ImageRotationAngle" property is changed. Use "resetCustomImageRotationAnfle" function if image viewer must reset value of custom rotation angle for image.

Best regards, Alexander
jwalit.katira
Posts: 31
Joined: Mon Sep 18, 2023 1:41 pm

Re: We are not able to get Angle rotation value after performing rotation in web document viewer

Post by jwalit.katira »

Hello Alex,

resetCustomImageRotationAngle will reset my rotation angle to zero again , my requirement is when is set setCustomImageRotationAngle to 90 for first time , second time I should get that 90 so that I can again add other 90 to it and make it 180

Also do let me know if any other way if I can rotate single page of my PDF/TIFF

Thanks
Jwalit Katira
Alex
Site Admin
Posts: 2319
Joined: Thu Jul 10, 2008 2:21 pm

Re: We are not able to get Angle rotation value after performing rotation in web document viewer

Post by Alex »

Hello Jwalit,

VintaSoft web image viewer allows to rotate an image display.

The WebImageViewerJS.get_ImageRotationAngle function allows to set rotation for all images in viewer.

If you want to apply custom rotation to an image in viewer, you need to use the WebImageViewerJS.setCustomImageRotationAngle function. The custom rotation angle does not depend from rotation for all images.

If you want to get the custom rotation angle, which is applied to an image in viewer, please use the WebImageViewerJS.getCustomImageRotationAngle function.

If you want to set the custom rotation angle, which is applied to an image in viewer, please use the WebImageViewerJS.setCustomImageRotationAngle function.

If you want to reset the custom rotation angle, which is applied to an image in viewer, please use the WebImageViewerJS.resetCustomImageRotationAngle function. Reset operation means that image will be rotated as all other images.

Best regards, Alexander
jwalit.katira
Posts: 31
Joined: Mon Sep 18, 2023 1:41 pm

Re: We are not able to get Angle rotation value after performing rotation in web document viewer

Post by jwalit.katira »

Thanks Alex,

It is working fine , however do you have any single get method that help me to get angle even if it is custom or not , so that when user click right rotate it will rotate image

Thank
Jwalit katira
Alex
Site Admin
Posts: 2319
Joined: Thu Jul 10, 2008 2:21 pm

Re: We are not able to get Angle rotation value after performing rotation in web document viewer

Post by Alex »

It is working fine , however do you have any single get method that help me to get angle even if it is custom or not , so that when user click right rotate it will rotate image
No, VintaSoft web image viewer does not have "one" method that returns an image rotation angle.

Best regards, Alexander
Alex
Site Admin
Posts: 2319
Joined: Thu Jul 10, 2008 2:21 pm

Re: We are not able to get Angle rotation value after performing rotation in web document viewer

Post by Alex »

Hello Jwalit,
It is working fine , however do you have any single get method that help me to get angle even if it is custom or not , so that when user click right rotate it will rotate image
VintaSoft Imaging .NET SDK 12.3 has been release today. In this version we changed algorithm that rotates view in viewer and now you do not need to create custom code. Please evaluate version 12.3 and let me know if you will have any question or problem.

Best regards, Alexander
Post Reply