You are on page 1of 3

Start Time: 2024/01/11 07:45:10

End Time: 2024/01/11 08:44:04


Agents: Somdutt

Transcripts:
Agent Somdutt has joined the chat.
[2024/01/11 07:45:11] Somdutt: Dear Nareg, thank you for contacting us! How may I help you?
[2024/01/11 07:45:48] Nareg: hello
[2024/01/11 07:45:50] Nareg: i have an error
[2024/01/11 07:45:54] Nareg: handleUploadClick() { console.log('entering onclick method ');
this.DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer'); console.log('on
handleUploadClick images: ', this.DWObject.HowManyImagesInBuffer); console.log('DWObject
>>' + this.DWObject); console.log('check dynamsoft::: ',Dynamsoft.WebTwainEnv);
console.log('DWObject Image>>' + Dynamsoft.EnumDWT_ImageType.IT_ALL);
console.dir(this.DWObject); if (this.DWObject) { this.DWObject.IfShowFileDialog = true;
this.DWObject.Addon.PDF.SetResolution(100);
this.DWObject.Addon.PDF.SetConvertMode(Dynamsoft.EnumDWT_ConvertMode.CM_RENDER
ALL); //this.DWObject.LoadImageEx("", Dynamsoft.EnumDWT_ImageType.IT_ALL,
this.onSuccess, this.onFailure); this.DWObject.LoadImageEx( "",
Dynamsoft.EnumDWT_ImageType.IT_ALL, () => { console.log('success'); console.log('on success
LoadImageEx: ', this.DWObject.HowManyImagesInBuffer);
console.log('DWObject.CurrentImageIndexInBuffer,', this.DWObject.CurrentImageIndexInBuffer);
}, (errorCode, errorString) => { console.log('errorString:: ', errorString); } ); //console.log('after
LoadImageEx: ',this.DWObject.HowManyImagesInBuffer); } } here the user can upload any
document from their pc, i am using dynamsfot version 16.1.1 , from the console.log in the success
function, i can see that the image buffer is increasing everytime the user uploads a new document,
but nothing is getting displayed in the div of dwtcontrolContainer(the uploaded docuemnts are not
getting displayed). this happens only when the page re renders for some reason (if the users goes
to the previous page and gets back to this page). all is good when the user visits the page for the
first time
[2024/01/11 07:47:13] Somdutt: Ok, you will need to refresh the page the page to get to see the
changes?
[2024/01/11 07:47:23] Nareg: yes
[2024/01/11 07:48:20] Nareg: if i refresh the page, everyting is going back to zero and when i
upload a document the image buffer starts from zero and the documents are all getting displayed
[2024/01/11 07:51:03] Somdutt: Ok, seems the page is not getting re-render when you click
upload as you shared the buffer is increasing. Do you see any error or warning in the console as
well?
[2024/01/11 07:51:21] Nareg: no errors
The visitor has sent a file: dynamm.PNG
[2024/01/11 07:52:30] Nareg: image buffer increases without any image getting displayed here
[2024/01/11 07:53:43] Somdutt: May I know if this dialogue is created by yourself or the SDK?
[2024/01/11 07:54:08] Nareg: sdk, this is the html<div> <div class="dwtcontrolContainer" data-
id="dwtcontrolContainer" ></div> <div class="flex-icons"> <a onclick={handleCrop} class="icon-
holder"><i class="icon-crop"></i></a> <a data-left="left" class="icon-holder"
onclick={handleRotateLeft}><i class="icon-rotate-left"></i></a> <a data-right="right" class="icon-
holder" onclick={handleRotateRight}><i class="icon-rotate-right"></i></a> <a
onclick={handleDelete} class="icon-holder"><i class="icon-delete"></i></a> </div> </div>
[2024/01/11 07:58:32] Somdutt: It seems, you created the dialogue by your own, so you will need
to put your own code to display the image container.
[2024/01/11 07:59:07] Nareg: okay, but how can i get the image url
[2024/01/11 07:59:52] Nareg: if i use this this.DWObject.getImageURL(Index) , i am getting false
[2024/01/11 08:00:25] Somdutt: Give me a moment to check.
[2024/01/11 08:00:34] Nareg: okay
[2024/01/11 08:04:17] Somdutt: Can you try this API to refresh the viewer, when you upload the
image?
[2024/01/11 08:04:18] Somdutt: https://www.dynamsoft.com/web-
twain/docs/info/api/WebTwain_Viewer.html#render
[2024/01/11 08:05:13] Nareg: okay give me a moment please
[2024/01/11 08:05:45] Nareg: should i put this the success function ?
[2024/01/11 08:08:18] Somdutt: You should put this when you have successfully uploaded the
image.
[2024/01/11 08:08:19] Nareg: this.DWObject.LoadImageEx( "",
Dynamsoft.EnumDWT_ImageType.IT_ALL, () => { console.log('success'); console.log('on success
LoadImageEx: ', this.DWObject.HowManyImagesInBuffer);
console.log('DWObject.CurrentImageIndexInBuffer,', this.DWObject.CurrentImageIndexInBuffer);
this.DWObject.Viewer.on("pageRendered", function (index) { console.log(index); });
this.DWObject.Viewer.render(); }, (errorCode, errorString) => { console.log('errorString:: ',
errorString); } );
[2024/01/11 08:08:27] Nareg: nothing is happening
[2024/01/11 08:13:48] Somdutt: Can you create the viewer instance in the dialogue you created
and bind it to webTwain as mentioned in this?
[2024/01/11 08:13:49] Somdutt: https://www.dynamsoft.com/web-
twain/docs/info/api/WebTwain_Viewer.html#bind
[2024/01/11 08:15:07] Nareg: i should this in the success also ?
[2024/01/11 08:19:50] Somdutt: You should be having the DWT container in html and bind it using
this API
[2024/01/11 08:19:51] Somdutt: https://www.dynamsoft.com/web-
twain/docs/info/api/WebTwain_Viewer.html#bind
[2024/01/11 08:20:09] Somdutt: https://www.dynamsoft.com/web-
twain/docs/info/api/WebTwain_Viewer.html#bind
[2024/01/11 08:20:30] Somdutt: DWT html example https://www.dynamsoft.com/web-
twain/docs/getstarted/helloworld.html#:~:text=%22AcquireImage()%3B%22%20/%3E-
,%3Cdiv%20id%3D%22dwtcontrolContainer%22%3E%3C/div%3E,-%3Cscript%20type%3D
[2024/01/11 08:21:22] Nareg: okay deal, we can close the chat so that ill try this
[2024/01/11 08:21:23] Nareg: thank you
[2024/01/11 08:24:05] Somdutt: Sure, if you face any issue while implementing this, you can come
again. I will arrange a team member specialized in this product.
[2024/01/11 08:28:13] Nareg: deal thank you
[2024/01/11 08:29:04] Somdutt: Welcome
The transcript will be sent to "nareg.artinian@eit-mena.com" after the chat ends.
It's been a while since your last response. Please respond within the next few minutes or this chat
will be ended.
It's been quite a long time since your last response.
The visitor has left the chat.
The chat is ended. (2024/01/11 08:44:05)

You might also like