Web Scanning properties at client side JavaScript

Discussions about DocuVieware integration in GdPicture.NET.
Post Reply
SMOsama
Posts: 17
Joined: Tue Aug 10, 2021 8:17 pm

Web Scanning properties at client side JavaScript

Post by SMOsama » Wed Aug 11, 2021 12:18 pm

I am using JavaScript and ASP.NET MVC for using GdPicture14.WEB.DocuVieware. I will have textbox where user will enter brightness and contrast values and after that user will upload image, PDF or use TwainAcquireToNewDocument to upload and that user entered values of brightness and contrast should apply to that uploaded file. How can I achieve this in JavaScript. I have gone through documentation but cannot find it in DocuViewareAPI. Yes, this functionality is in gdpictureImaging but I how can I use this in JavaScript client side.

One more question over here is what is difference between SetBrightness and TwainSetBrightness because at server side I was calling TwainSetBrightness and to do that I read from documentation that the result of TwainGetState() should be 4 i.e SOURCE_OPEN but when I called TwainGetState() it gives 3 i.e TWAIN_SM_OPEN. How can I do it to 4. In windows form application we can use _oGdPictureImaging.TwainSelectSource(IntPtr.Handle) and after that we can have 4 i.e SOURCE_OPEN. But we cannot have IntPtr.Handle in asp.net mvc or in JavaScript. So, how to move state to 4 to use TwainSetBrightness.

I am using almost latest DLL's
GdPicture.NET.14.WEB.DocuVieware.dll

GdPicture.NET.14.filters.64.dll
GdPicture.NET.14.image.gdimgplug.64.dll
GdPicture.NET.14.Imaging.Rendering.Skia.64.dll

I have attached files, these are not executable but surely you can get the idea what I have done until now.
Attachments
JavaScript & asp.net mvc- Docuvieware.zip
(3.87 KiB) Downloaded 17 times

User avatar
Fabio
Posts: 125
Joined: Thu Aug 27, 2020 9:57 am

Re: Web Scanning properties at client side JavaScript

Post by Fabio » Thu Aug 12, 2021 2:45 pm

Hello there,

If I understand well your requirement, you can simply call a PostCustomServerAction and send the brightness/contrast values to the server to apply the modifications. All the heavy processes (OCR, image manipulation, conversion, etc..) are always loaded on the server-side with DocuVieware since we want to provide zero footprints to the client. So you will not be able to directly change these parameters by the JS itself.
Do not hesitate to elaborate on it if I missed something.

The difference between the SetBrightness and TWAINSetBrightness methods is if you want to set the brightness at the image acquisition or directly in an existing image.
In order to avoid any old issue that was resolved, could you update the DocuVieware SDK on your machine and change the DLLs/min-js/min-css and test it again, please?
If the issue still occurs, please, could you provide a minimalistic sample that reproduces it?

With best,
Fabio

SMOsama
Posts: 17
Joined: Tue Aug 10, 2021 8:17 pm

Re: Web Scanning properties at client side JavaScript

Post by SMOsama » Wed Aug 18, 2021 9:40 am

Sorry for late reply. I have used TwainCapabilities for client side and it is working fine for me. Thanks for your reply.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest