DocuVieware Reference Guide
TwainAcquireToCurrentDocument
Reference Guides > JavaScript API > Actions > TWAIN Acquisition > TwainAcquireToCurrentDocument
 TwainAcquireToCurrentDocument

This function allows you to scan from a specific TWAIN device at a specific location in the current document (or also in a new document).

TwainAcquireToCurrentDocument: function (docuViewareID, deviceName, position)

Parameters

docuViewareID
The identifier for the DocuVieware™ instance you want to acquire in.
deviceName
A string that contains the TWAIN device name. You should call the TwainGetSources method prior this method to find the suitable device.
position
An integer value to define where the new page(s) will be added in the current document.
Possible values are:
  • 1 : append after last page
  • 2 : insert before current page
  • 3 : insert after current page

Return Value

1 if error, 0 if success.