Dynamic Web twaintwain Scan Recognition tool to add text to images

Source: Internet
Author: User

The Dynamic Web Twaintwain Scan Recognition tool adds text to the image Dynamic Web Twain is a TWAIN scan recognition tool applied to a Web application that simply writes a few lines of code on the Twain interface, You can scan a document with a TWAIN-compatible scanner or obtain an image from a digital camera/capture card and process the captured image. Version support

Dynamic WEB TWAIN versions V7 and above

Grammar

Boolean Objectname.addtext (short imageindex, int x, int y, String Text, int textcolor, int
BackgroundColor, float Backgroundroundradius, float backgroundopacity)

Parameters
    • Short ImageIndex: Target image index
    • Int x: The x-coordinate of the text
    • Int y: The y-coordinate of the text
    • String text: The text to be added
    • Int textcolor: Text color
    • Int backgroundcolor: Background color
    • Float Backgroundroundradius: The range is 0 to 0.5; Note: This parameter is not supported for Mac edition.
    • Float backgroundopacity: Specifies the opacity of the added text background, ranging from 0 to 1.0; Note: Mac version supports 0 to 1.
return value

Boolean:true indicates success, false indicates failure

Mark

When the Ifthrowexception property is true, an exception is thrown when an error occurs. When you return false or throw an exception, check the ErrorCode property and the ErrorString property for an error message.

Example

Here is a JavaScript example:

<script language= "javascript" type= "text/javascript" >  dwobject = document.getElementById (" Idynamicwebtwain ");//idynamicwebtwain is the ID of the the Dynamic Web TWAIN on the page (a object or an embed).   f Unctionbtnaddtext_onclick () {        dwobject.addtext (         DWObject.CurrentImageIndexInBuffer,         document.getelementbyid ("Addtext_left"). Value,//value for setting the X coordinate for the text         document.getelementbyid ("Addtext_top"). Value,//Value for setting the Y Coordinate for the Text        document.getelementbyid ("AddText_Text"). Value,//the text to be Added        document.getelementbyid ("AddText_ Txtcolor "). Value,//the color of the Text        document.getelementbyid ("Addtext_bgcolor "). Value,//the background color of the text         document.getElementById ("Addtext_bgroundradius"). Value,//the value for the background radius         document.getelementbyid ("Addtext_bgopacity"). Value//the value for the background opacity    );  }     </script>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.