@@ -138,8 +138,8 @@ function PdfRequestFiles() {
138
138
// eslint-disable-next-line react-hooks/exhaustive-deps
139
139
} , [ divRef . current ] ) ;
140
140
141
- async function checkIsSubscribed ( ) {
142
- const res = await fetchSubscription ( ) ;
141
+ async function checkIsSubscribed ( extUserId ) {
142
+ const res = await fetchSubscription ( extUserId ) ;
143
143
const plan = res . plan ;
144
144
const billingDate = res . billingDate ;
145
145
if ( plan === "freeplan" ) {
@@ -169,7 +169,8 @@ function PdfRequestFiles() {
169
169
//getting document details
170
170
const documentData = await contractDocument ( documentId ) ;
171
171
if ( documentData && documentData . length > 0 ) {
172
- const url = documentData [ 0 ] && documentData [ 0 ] ?. URL ;
172
+ const url =
173
+ documentData [ 0 ] && ( documentData [ 0 ] ?. SignedUrl || documentData [ 0 ] ?. URL ) ;
173
174
//convert document url in array buffer format to use embed widgets in pdf using pdf-lib
174
175
const arrayBuffer = await convertPdfArrayBuffer ( url ) ;
175
176
if ( arrayBuffer === "Error" ) {
@@ -178,7 +179,7 @@ function PdfRequestFiles() {
178
179
setPdfArrayBuffer ( arrayBuffer ) ;
179
180
}
180
181
if ( isEnableSubscription ) {
181
- await checkIsSubscribed ( documentData [ 0 ] ?. ExtUserPtr ?. Email ) ;
182
+ await checkIsSubscribed ( documentData [ 0 ] ?. ExtUserPtr ?. objectId ) ;
182
183
}
183
184
setExtUserId ( documentData [ 0 ] ?. ExtUserPtr ?. objectId ) ;
184
185
const isCompleted =
0 commit comments