Web Scanning properties at client side JavaScript

Discussions about DocuVieware integration in GdPicture.NET.
Post Reply
SMOsama
Posts: 18
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 391 times

User avatar
Fabio
Posts: 173
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: 18
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.

superedan
Posts: 1
Joined: Thu Feb 02, 2023 3:53 am

Re: Web Scanning properties at client side JavaScript

Post by superedan » Thu Feb 02, 2023 3:55 am

The interpreter's inability to distinguish between the trusted code the developer intended and the injected code the attacker supplied as an input results in the security vulnerability.
1v1 lol

tonyadams
Posts: 1
Joined: Fri Mar 17, 2023 3:35 am

Re: Web Scanning properties at client side JavaScript

Post by tonyadams » Fri Mar 17, 2023 3:44 am

So as to apply the user-entered brightness and contrast values to an uploaded image or PDF, you can use the GdPicture14 JavaScript API provided by DocuVieware. Specifically, io games you can use the `ApplyEffect` method of the `DocuVieware` object to apply the desired effects to the currently displayed document.

visaroe
Posts: 2
Joined: Fri Mar 17, 2023 3:44 am

Re: Web Scanning properties at client side JavaScript

Post by visaroe » Fri Mar 17, 2023 3:57 am

The source code for the executable that hosts the scanning service is given so that you may add additional libraries as required, brand the EXEcoreball as needed, and package the executable using your preferred packaging tools.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest