@@ -500,7 +500,6 @@ function SignYourSelf() {
500
500
removeBase64Fromjpeg ,
501
501
""
502
502
) ;
503
-
504
503
//function for call to embed signature in pdf and get digital signature pdf
505
504
signPdfFun ( newImgUrl , documentId , data , pdfBase64 , pageNo ) ;
506
505
} )
@@ -575,14 +574,18 @@ function SignYourSelf() {
575
574
const scale = isMobile ? pdfOriginalWidth / newWidth : 1 ;
576
575
577
576
const posY = ( ) => {
578
- if ( id === 0 ) {
579
- return (
580
- page . getHeight ( ) -
581
- imgUrlList [ id ] . yPosition * scale -
582
- imgHeight
583
- ) ;
584
- } else if ( id > 0 ) {
585
- return page . getHeight ( ) - imgUrlList [ id ] . yPosition * scale ;
577
+ if ( isMobile ) {
578
+ if ( id === 0 ) {
579
+ return (
580
+ page . getHeight ( ) -
581
+ imgUrlList [ id ] . yPosition * scale -
582
+ imgHeight
583
+ ) ;
584
+ } else if ( id > 0 ) {
585
+ return page . getHeight ( ) - imgUrlList [ id ] . yPosition * scale ;
586
+ }
587
+ } else {
588
+ return page . getHeight ( ) - imgUrlList [ id ] . yPosition - imgHeight ;
586
589
}
587
590
} ;
588
591
page . drawImage ( img , {
@@ -596,7 +599,6 @@ function SignYourSelf() {
596
599
} ) ;
597
600
}
598
601
const pdfBytes = await pdfDoc . saveAsBase64 ( { useObjectStreams : false } ) ;
599
-
600
602
signPdfFun ( pdfBytes , documentId ) ;
601
603
}
602
604
setIsSignPad ( false ) ;
@@ -615,10 +617,11 @@ function SignYourSelf() {
615
617
pageNo
616
618
) => {
617
619
let singleSign ;
620
+
618
621
const isMobile = window . innerWidth < 767 ;
619
622
const newWidth = window . innerWidth ;
620
623
const scale = isMobile ? pdfOriginalWidth / newWidth : 1 ;
621
- const imgWidth = xyPosData . Width . Width ? xyPosData . Width . Width : 150 ;
624
+ const imgWidth = xyPosData ? xyPosData . Width : 150 ;
622
625
if ( xyPostion . length === 1 && xyPostion [ 0 ] . pos . length === 1 ) {
623
626
const height = xyPosData . Height ? xyPosData . Height : 60 ;
624
627
const bottomY = xyPosData . isDrag
@@ -1115,6 +1118,8 @@ function SignYourSelf() {
1115
1118
pdfDetails = { pdfDetails }
1116
1119
isShowHeader = { true }
1117
1120
currentSigner = { true }
1121
+ alreadySign = { pdfUrl ? true : false }
1122
+ isSignYourself = { true }
1118
1123
/>
1119
1124
1120
1125
{ /* className="hidePdf" */ }
0 commit comments