Hi,
On Mac you can use scanline https://github.com/klep/scanline
<https://github.com/klep/scanline>
It is a cli util so with some launch external process calls you can drive it
i.e.
To get the list of available scanners
$command:="/usr/local/bin/scanline -list -browsesecs 1 "
$std_in:=""
$std_out:=""
$error:=""
LAUNCH EXTERNAL PROCESS($command;$std_in;$std_out;$error)
To actually do a scan
//vSCANDOCS_scanner is the name of the scanner found with the -browsesecs option
$command:="/usr/local/bin/scanline -scanner \""+vSCANDOCS_scanner
$command:=$command+"\" -a4 -flatbed -dir \""+Convert path system to
POSIX($folder)+"\" -name "+$filename_for_scan
$std_in:=""
$std_out:=""
$error:=""
LAUNCH EXTERNAL PROCESS($command;$std_in;$std_out;$error)
So far I’ve been using it up to OS X 10.14, I’m in the process of testing it on
Catalina, we’ll see
HIH
Claudio Braga
**********************
[email protected]
[email protected]
[email protected]
**********************
> Il giorno 21 giu 2021, alle ore 18:53, Jody Bevan via 4D_Tech
> <[email protected]> ha scritto:
>
> David:
>
> Thanks for that snip of code. Hopefully someone in the know will be able to
> let us know about the MacOS.
>
> Thanks
>
> Jody Bevan
>
>> On Jun 21, 2021, at 4:20 AM, David Samson via 4D_Tech <[email protected]>
>> wrote:
>>
>> Hello,
>>
>> I don't know about Macs but on a PC you don't need a plugin for simple
>> scanning. I use
>>
>> I use a free program called NAPS2 which has proven to be very reliable over
>> the years. I scan the document into a known folder and retrieve it from
>> there and can then do what I want with it.
>>
>> The code is simply the following:
>>
>> SET ENVIRONMENT VARIABLE("_4D_OPTION_HIDE_CONSOLE";"true")
>>
>> cDTPath:=System folder(Desktop)
>> cDTPath:=cDTPath+Char(92)+"4DScan"+Char(92)
>> cDTPath:=PATH_Fix (cDTPath)
>>
>> If (Test path name(cDTPath)#Is a folder)
>> CREATE FOLDER(cDTPath)
>> Else
>> DOCUMENT LIST(cDTPath;acOldDocs)
>> For ($old;1;Size of array(acOldDocs))
>> DELETE DOCUMENT(cDTPath+acOldDocs{$old})
>> End for
>> End if
>>
>> cDTPath:=cDTPath+Char(92)+"ScannedPI"+Generate UUID+".pdf"
>> cDTPath:=PATH_Fix (cDTPath)
>> LAUNCH EXTERNAL PROCESS("C:\\Program Files (x86)\\nAPS2\\naps2.console
>> -o"+cDTPath)
>>
>> All you need to do in setting up NAPS2 is to create a profile which tells
>> it which scanner to use.
>>
>> HTH
>> David
>>
>>
>>> Message: 1
>>> Date: Thu, 17 Jun 2021 16:54:47 +0100
>>> From: Peter Mew <[email protected]>
>>> To: 4D iNug Technical <[email protected]>
>>> Subject: 4D scanning
>>> Message-ID:
>>> <
>>> cao0ooqqc_ribzifseq7h6wsm-u+fejteuww26xnybpme5ax...@mail.gmail.com>
>>> Content-Type: text/plain; charset="UTF-8"
>>>
>>> Hi
>>> I havent done any of this for a while so Im a bit! rusty.
>>> I looking to download Miyakos twain plug in, Where do I find it? or is
>>> there a better plugin that will capture scans and work with 4D v13 mac and
>>> PC preferably free
>>> thanks
>>> -pm
>>>
>>>
>>>
>> **********************************************************************
>> 4D Internet Users Group (4D iNUG)
>> New Forum: https://discuss.4D.com
>> Archive: http://lists.4d.com/archives.html
>> Options: https://lists.4d.com/mailman/options/4d_tech
>> Unsub: mailto:[email protected]
>> **********************************************************************
>
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> New Forum: https://discuss.4D.com
> Archive: http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub: mailto:[email protected]
> **********************************************************************
**********************************************************************
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************