When is the viewer done loading the document?

How to know that all file pages are loaded

@abdllahmohmd,

There is a function called “controlID”_OnViewerReady() that probably can help you. This is called once the viewer is done on the server. The function is only called if you have it implemented.

Can I render pages as Canvas not input of type image?

@abdllahmohmd,

You can also use the javascript document ready function, so you know everything is loaded on the client side.

There are some things to keep in mind besides just how long the document is.

The thumbnails are handled as tiny pictures. And I have noticed that on old computers or with insufficient memory, sometimes the document is loaded completely, but the thumbnails are not yet. So it will depend on the client’s computer.

But in most of cases, document ready is more than enough to display the canvas. You can test this by running one of the demo versions and see how they handle the display of a document(with thumbnails and without)

We cannot change the way the viewer render on the screen.

Are you experiencing some specific issues?

I need to render pages to canvas so I can select portion of page

@abdllahmohmd,

That it is not possible. The only way to select portion of the screen is using the CopyText method. But in order to do that you need to have the Search plugin.

There are example in .NET Framework and .NET Core that show how to use the CopyText function.

Can I get base64 from src
src=“DocImage.axd?page=1&zoom=100&token=7641edce-a4a6-4b26-8572-64293e92eacc&rnd=561689008810728&format=png”

@abdllahmohmd,

At the moment there is not a way to obtain that.

I think it can be implemented in future but I cannot tell you when. As development and support are two separated teams. And as support team we do not push new functionality as much as bug fixing.

But this does not mean we will not comunicate there is interest in having a function to get the BASE64 of a document.

your viewer is very nice but I want to integrate it with OCR 3rd party so I need to select portion of page (will be image) and do OCR functionallity to this portion, this my scenario. It’s urgent

@abdllahmohmd,

I will communicate this. But I do not want to give you information that will not be real. So if this will be done or when I cannot answer that. I am sorry.

But I will let the team know this, that I can do for sure.

I know, but time is important. Thanks

@abdllahmohmd,

I keep thinking about what you need, even though it is not exactly what you need maybe you can use it.

The function export to something. This will give you an array of bytes in a respective format.

Example:

byte[] pdfBytes =  docViewer.ExportToPdf();

You have some formats that you can export a document: