Bug 114635 - In Writer 5.4.3.2 (x64)- Scanners not recognized
Summary: In Writer 5.4.3.2 (x64)- Scanners not recognized
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.0.0.5 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:6.1.0 target:6.3.0
Keywords:
: 112487 115306 115768 115913 121345 (view as bug list)
Depends on:
Blocks: Scanning
  Show dependency treegraph
 
Reported: 2017-12-21 20:29 UTC by Floyd
Modified: 2021-02-15 06:44 UTC (History)
16 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Floyd 2017-12-21 20:29:28 UTC
Description:
Open writer, do Insert - Media - Scan - Select Source

No available scanners are shown.  There is no selection box at all.  Similar function in Open Office writer displays available scanners just fine and scans correctly.  64 bit Windows 10

Steps to Reproduce:
1.Open new document
2.Try to insert a scanned document 
3.

Actual Results:  
Do this: Insert - media - scan - select source

Expected Results:
Nothing.  Cursor positioned at first character on first line of document.  No scanner source selection list presented.  And, yes, there are scanners on the system, and Open Office finds them just fine.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Present selection list of scanners on the system




User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0
Comment 1 Mike Kaganski 2017-12-21 21:41:28 UTC
Confirmed. The problem is with 64-bit LO.

The built-in scanner extension uses twain_32.dll on 32-bit Windows, and TWAINDSM.DLL on 64-bit Windows. The TWAINDSM.DLL is an open-source third-party library (https://github.com/twain/twain-dsm), normally absent on user's system. Copying the TWAINDSM DLL from the project's official site to LibreOffice program directory (beside soffice.bin) allows showing the scanner selector window... which could well be empty, because it is required that scanner vendor provide 64-bit scan drivers, which is almost never the case.

However, we should either remove the extension from 64-bit build, or ship the library with program.
Comment 2 Floyd 2017-12-21 22:07:06 UTC
I installed the DLL and got the selector window as you said.  No scanners in the window as you predicted.  I've uninstalled LibreOffice and will continue to use Open Office which does not suffer this restriction.  Thanks for your help.
Comment 3 Aron Budea 2017-12-21 22:18:25 UTC
Let's keep this open, because the underlying issue isn't resolved.

You could install a 32-bit LibreOffice build for an easy fix, btw.
Comment 4 V Stuart Foote 2017-12-21 23:29:58 UTC

*** This bug has been marked as a duplicate of bug 105762 ***
Comment 5 Mike Kaganski 2017-12-21 23:46:55 UTC
(In reply to V Stuart Foote from comment #4)
> 
> *** This bug has been marked as a duplicate of bug 105762 ***

While I agree with necessity to implement WIA support, please notice that it's not a good idea to close related, but not same bugs as duplicates of your pet bugs.

This bug is about non-functional existing technology. It has some problems currently (I'm working on a patch); specifically: nobody cared to check it on 64-bit Windows, so some structures are of wrong size; we don't ship necessary DLL with application.

But TWAIN on Windows 64 is still usable for most scanners, even those that don't have native drivers; e.g., using 3rd-party VueScan (http://www.hamrick.com/). I'm using it now to fix things.

So please, let this bug be open.
Comment 6 Mike Kaganski 2017-12-22 00:18:36 UTC
A fix to 64-bit issues in code is in gerrit: https://gerrit.libreoffice.org/46944

Another fix is needed to ship TWAINDSM.DLL with 64-bit build.
Comment 7 V Stuart Foote 2017-12-22 01:14:35 UTC
(In reply to Mike Kaganski from comment #5)
> 
> So please, let this bug be open.

Sure your call. 

But when Caolán had fixed the crash of bug 92478 and added TWAINDSM.DLL [1] it had seemed that WIA was still going to be necessary as TWAIN support/drivers really are non-existent for 64-bit Windows OS, hence -> bug 105762

I'd played with trying to register the TWAINDSM.DLL for 64-bit use to test Caolán's fix but could never get it to take.

Noticed the project is again active and they're now at https://github.com/twain/twain-dsm

=-ref-=
[1] https://gerrit.libreoffice.org/#/c/26541/
Comment 8 Mike Kaganski 2017-12-22 01:18:33 UTC
(In reply to V Stuart Foote from comment #7)

Thanks;

it's already working for me, if I have the TWAINDSM.DLL v.2.4 in program directory; and have the patch applied; and have VueScan installed (the latter provides the 64-bit TWAIN driver).
Comment 9 Commit Notification 2017-12-22 09:44:18 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7ea805eb81ce865198cdb0fe418a73f6c353310e

tdf#114635: fix TWAIN on Windows 64 bit

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Mike Kaganski 2018-01-11 18:36:25 UTC
Patch for second part: https://gerrit.libreoffice.org/46992
Comment 11 Mike Kaganski 2018-01-13 09:57:06 UTC
*** Bug 112487 has been marked as a duplicate of this bug. ***
Comment 12 V Stuart Foote 2018-01-30 05:29:44 UTC
*** Bug 115306 has been marked as a duplicate of this bug. ***
Comment 13 Commit Notification 2018-02-03 06:50:25 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=585d9806961342e95f7318fb947bd31e9f86dee0

tdf#114635: Add TWAINDSM.DLL to 64-bit Windows package

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 14 Dieter 2018-02-16 17:07:11 UTC
*** Bug 115768 has been marked as a duplicate of this bug. ***
Comment 15 Telesto 2018-02-16 23:00:49 UTC
A back-port to the 6.0 branch would be nice.. [if this is working, can't check..]
Comment 16 Julien Nabet 2018-02-21 15:17:04 UTC
*** Bug 115913 has been marked as a duplicate of this bug. ***
Comment 17 Julien Nabet 2018-02-21 15:18:41 UTC
Mike: do you think it'd be possible to backport the fixes on 6.0 branch?
Comment 18 Xisco Faulí 2018-06-12 09:26:40 UTC
A polite ping to Mike Kaganski:
Is this bug fixed? if so, could you please close it as RESOLVED FIXED ? Otherwise, Could you please explain what's missing?
Thanks
Comment 19 Xisco Faulí 2018-09-11 09:15:00 UTC
(In reply to Xisco Faulí from comment #18)
> A polite ping to Mike Kaganski:
> Is this bug fixed? if so, could you please close it as RESOLVED FIXED ?
> Otherwise, Could you please explain what's missing?
> Thanks

Ping?
Comment 20 Julien Nabet 2018-09-13 14:51:54 UTC
For those who have this pb, does it work better with last stable version 6.1.1?
Comment 21 V Stuart Foote 2018-09-13 15:45:51 UTC
On Windows 10 Ent 64-bit en-US with HP sj5370C USB with
Hamrick VueScan TWAIN support on:

Version: 6.1.0.3 (x64)
Build ID: efb621ed25068d70781dc026f7e9c5187a4decd1
CPU threads: 8; OS: Windows 10.0; UI render: GL; 
Locale: en-US (en_US); Calc: CL

and with

Version: 6.2.0.0.alpha0+ (x64)
Build ID: 18c5089df091bddeb8c2dc339776671964389040
CPU threads: 8; OS: Windows 10.0; UI render: GL; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-09-12_23:24:12
Locale: en-US (en_US); Calc: CL

In Writer or Draw
Insert -> Media -> Scan -> Select Source: VueScan-TWAIN
then
Insert -> Media -> Scan -> Request

preview, scan, save in VueScan dialog and close, image as scan added to canvas. 

So works correctly for Scanners with TWAIN support. But as per bug 105762 there is no native support for Windows Image Acquisition (WIA) based scanning platforms.

As 6.0 backport is mute, beleive => FIXED

But, note that Mike K. has several active issues over on the twain-dsm project's GitHub that look to affect packaging the external module. So defer to his judgment about this issue.
Comment 22 Ricardo 2018-09-14 01:13:01 UTC
(In reply to Commit Notification from comment #13)
> Mike Kaganski committed a patch related to this issue.
> It has been pushed to "master":
> 
> http://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=585d9806961342e95f7318fb947bd31e9f86dee0
> 
> tdf#114635: Add TWAINDSM.DLL to 64-bit Windows package
> 
> It will be available in 6.1.0.
> 
> The patch should be included in the daily builds available at
> http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
> information about daily builds can be found at:
> http://wiki.documentfoundation.org/Testing_Daily_Builds
> 
> Affected users are encouraged to test the fix and report feedback.

My libreoffice is 6.1.0.3 on windows 10 x64 and scanner Acer-Benq 620U, and included fix doesn´t work. I LO's directory are files : TWAINDSM.DLL and TWAINDSM64.msm but nothing. Acer Driver x64 on w10 not signed, and it was installed correctly and it work with MS paint, by example. 
what do I have to do make Libreoffice works?

Thanks all.
Comment 23 Ricardo 2018-09-14 01:17:22 UTC
(In reply to Commit Notification from comment #13)
> Mike Kaganski committed a patch related to this issue.
> It has been pushed to "master":
> 
> http://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=585d9806961342e95f7318fb947bd31e9f86dee0
> 
> tdf#114635: Add TWAINDSM.DLL to 64-bit Windows package
> 
> It will be available in 6.1.0.
> 
> The patch should be included in the daily builds available at
> http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
> information about daily builds can be found at:
> http://wiki.documentfoundation.org/Testing_Daily_Builds
> 
> Affected users are encouraged to test the fix and report feedback.

My libreoffice is 6.1.0.3 on windows 10 x64 and scanner Acer-Benq 620U, and included fix doesn´t work. I LO's directory are files : TWAINDSM.DLL and TWAINDSM64.msm but nothing. Acer Driver x64 on w10 not signed, and it was installed correctly and it work with MS paint, by example. 
what do I have to do to make the scanner work in LibreOffice?

Thanks all.
Comment 24 V Stuart Foote 2018-09-14 12:55:46 UTC
(In reply to Ricardo from comment #22)

> My libreoffice is 6.1.0.3 on windows 10 x64 and scanner Acer-Benq 620U, and
> included fix doesn´t work. I LO's directory are files : TWAINDSM.DLL and
> TWAINDSM64.msm but nothing. Acer Driver x64 on w10 not signed, and it was
> installed correctly and it work with MS paint, by example. 
> what do I have to do to make the scanner work in LibreOffice?
> 
> Thanks all.

That is a WIA driver, the scanner will not work with LibreOffice without a viable TWAIN driver which BenQ does not provide.  You need a 3rd party 32-bit & 64-bit TWAIN drivers & configuration--VueScan is know to work correctly.
Comment 25 V Stuart Foote 2018-09-20 22:39:38 UTC
*** Bug 115913 has been marked as a duplicate of this bug. ***
Comment 26 Ari Latvala 2018-09-21 07:29:43 UTC
Is there any working free TWAIN sw for 64-bit Windows 10? Tested VueScan together with LO 6.1.1 for Canon CanoScan Lide 220 and it works but VueScan is not free. So tried PaperPort and NAPS2, neither seems to work with LibreOffice, i.e. "Select Source" shows nothing on LO, even though both programs claim to be using TWAIN.
Comment 27 V Stuart Foote 2018-09-21 16:12:38 UTC
(In reply to Ari Latvala from comment #26)
> Is there any working free TWAIN sw for 64-bit Windows 10? Tested VueScan
> together with LO 6.1.1 for Canon CanoScan Lide 220 and it works but VueScan
> is not free. So tried PaperPort and NAPS2, neither seems to work with
> LibreOffice, i.e. "Select Source" shows nothing on LO, even though both
> programs claim to be using TWAIN.

Just gave NAPS2 a try, while it supports TWAIN (32 & 64-bit) it does not bundle the driver support. As with LibreOffice *you* have to provide them--old 32-bit TWAIN drivers from vendors can be found. But, 64-bit TWAIN drivers are scarce--Hamrick Software's VueScan bundles some of the few 64-bit TWAIN driver implementations for various scanner brands.

YMMV, but I found NAPS2 is quite happy to use the VueScan provided 64-bit, or 32-bit, TWAIN drivers for an old HP sj5370C USB scanner.
Comment 28 ribotb 2018-10-29 16:22:06 UTC
No scanner detected with KO 6.1.0 on Windows 10 x64.

Scanner is detected with my other softwares.

Bernard
Comment 29 V Stuart Foote 2018-10-29 17:41:19 UTC
(In reply to ribotb from comment #28)
> No scanner detected with KO 6.1.0 on Windows 10 x64.
> 
> Scanner is detected with my other softwares.

So likely WIA based driver, see bug 105762. Otherwise locate 64-bit TWAIN driver for scanner and it should work for you.
Comment 30 Oliver Brinzing 2018-11-11 12:07:35 UTC
*** Bug 121345 has been marked as a duplicate of this bug. ***
Comment 31 tecnosurvivor 2018-11-30 22:11:21 UTC
I'm not sure if I have to open a new bug, but I prefer to start with a comment here (please let me know if it's the right option).

LO is not showing my HP OfficeJet 6950 scanner in the scanner source selection dialog (from Draw and Writer at least), well actually it doesn't show anything inside that dialog, it's completely empty. I can see the scanner from MS Paint.

My system is Windows 8.1 64 bits and I'm now trying to make this work under this LO version:

Versión: 6.1.3.2 (x64)
Id. de compilación: 86daf60bf00efa86ad547e59e09d6bb77c699acb
Subprocs. CPU: 4; SO: Windows 6.3; Repres. IU: predet.; 
Configuración regional: es-ES (es_ES); Calc: CL

But it worked even worst using version 6.0.1, because scanner source selection dialog didn't appear at all.

I don't think using Vuescan is a good option for those who choose to use "Libre" Office (as #26 says) and I'm not so smart to deal with .dll and other technical stuff I've read in other comments. So it'd be great if there was a solution for dummies...

Thanks for the amazing work IT wise people are doing for all of us.
Comment 32 V Stuart Foote 2018-11-30 23:11:42 UTC
(In reply to tecnosurvivor from comment #31)
> ...
> I don't think using Vuescan is a good option for those who choose to use
> "Libre" Office (as #26 says) and I'm not so smart to deal with .dll and
> other technical stuff I've read in other comments. So it'd be great if there
> was a solution for dummies...
> 
> Thanks for the amazing work IT wise people are doing for all of us.

Sorry, it is incumbent on you to provide the drivers for your scanner.
And the LibreOffice Project can't control or support that. 

At some point we may gain support for Windows Image Acquisition (bug 105762)--but that also requires a different set of drivers (just more common in 64-bit flavors).

Meanwhile you might find generic HP 32bit TWAIN drivers from HP for your scanner (I could not) and you then could load a 32-bit build of LibreOffice. 

Or you can use the 64bit TWAIN drivers from Hamrick, free trial to test support for function, and follow up with a purchase of VueScan if you choose.

Think of a ViewScan purchase as buying driver support for your otherwise unsupported hardware.
Comment 33 jaydenrobin 2018-12-07 16:23:28 UTC Comment hidden (spam)
Comment 34 Mike Kaganski 2018-12-28 18:31:20 UTC
https://gerrit.libreoffice.org/65688
Comment 35 Commit Notification 2018-12-29 08:58:32 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/648f24f5d1dae3f0fd5b132d68a5e39066f2572d%5E%21

tdf#114635: reimplement TWAIN-based scan using 32-bit shim on Windows

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 36 Commit Notification 2018-12-30 00:43:44 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/70e1be1b2f40e881b9aeee8f0d39f894dbf67205%5E%21

tdf#114635: Scan operations are modal

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 37 Xisco Faulí 2019-01-01 17:23:36 UTC
Hi Mike Kaganski,
Thanks for fixing this!
Should it be, at least, backported to 6-2 branch ?
Comment 38 Mike Kaganski 2019-01-02 00:29:47 UTC
(In reply to Xisco Faulí from comment #37)
> Should it be, at least, backported to 6-2 branch ?

I don't think so.

This is a "new feature" in a sense: support for scan on 64-bit Windows (something we never had before). And its implementation changes how it works drastically. The change could have major issues requiring fixes, so I'm not comfortable with backporting this to 6.2 at RC2 stage, which could make using it impossible with 32-bit installations. We should give it more testing in 6.3 cycle.
Comment 39 Xisco Faulí 2019-01-02 14:07:52 UTC
(In reply to Mike Kaganski from comment #38)
> (In reply to Xisco Faulí from comment #37)
> > Should it be, at least, backported to 6-2 branch ?
> 
> I don't think so.
> 
> This is a "new feature" in a sense: support for scan on 64-bit Windows
> (something we never had before). And its implementation changes how it works
> drastically. The change could have major issues requiring fixes, so I'm not
> comfortable with backporting this to 6.2 at RC2 stage, which could make
> using it impossible with 32-bit installations. We should give it more
> testing in 6.3 cycle.

Fair enough !
I see you added it to the release notes -> https://wiki.documentfoundation.org/ReleaseNotes/6.3
Thanks for implementing this feature!!
Comment 40 cemllyrios 2019-01-04 07:13:33 UTC Comment hidden (spam)
Comment 41 cemllyrios 2019-01-04 07:15:09 UTC Comment hidden (spam)
Comment 42 ANNYSMITH 2019-01-07 10:33:52 UTC Comment hidden (spam)
Comment 43 ANNYSMITH 2019-01-07 10:36:54 UTC Comment hidden (spam)
Comment 44 anny pinto 2019-01-09 07:00:14 UTC Comment hidden (spam)
Comment 45 anny pinto 2019-01-09 07:02:37 UTC Comment hidden (spam)
Comment 46 oliverroy 2019-01-10 11:16:11 UTC Comment hidden (spam)
Comment 47 CCTVInstallation 2019-01-15 08:56:38 UTC Comment hidden (spam)
Comment 48 ribotb 2019-01-15 09:25:44 UTC
Tested with :

Version: 6.3.0.0.alpha0+ (x64)
Build ID: 411f3a050ac2be598019d512f8ccfe041080c28f
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-01-14_03:17:11
Locale: fr-FR (fr_FR); UI-Language: en-US
Calc: threaded

It's OK, my TWAIN 32-bit driver is detected.

Bernard
Comment 49 donatellamiller 2019-01-28 09:34:08 UTC Comment hidden (spam)
Comment 50 donatellamiller 2019-01-28 09:36:58 UTC Comment hidden (spam)
Comment 51 Julien Nabet 2019-01-28 09:39:21 UTC
@donatellamiller: if you don't want your messages be considered as spams, please top adding a link at the end of them.
Comment 52 Mike Kaganski 2019-01-28 09:55:38 UTC
(In reply to Julien Nabet from comment #51)

That is true spam: the text is taken from a random comment above, and a spamlink is added.
Comment 53 Shivam 2019-04-22 18:06:05 UTC Comment hidden (spam)
Comment 54 haleybrown 2020-05-06 10:08:35 UTC Comment hidden (spam)
Comment 55 Julien Nabet 2020-05-06 10:16:09 UTC
Xisco: it could be interesting to block bugtrackers with closed status for non not explicitely authorized people. Any idea whom to ping?
Comment 56 Xisco Faulí 2020-05-06 10:18:22 UTC
(In reply to Julien Nabet from comment #55)
> Xisco: it could be interesting to block bugtrackers with closed status for
> non not explicitely authorized people. Any idea whom to ping?

yes, that's something that could be improved. will try to implement it...
Comment 57 Jan Broendum Johansson 2021-02-15 06:36:14 UTC
I have the excact same problem with Libreoffice, through the version that came with my Peach OSI TW 16.04(Xubuntu) 64 bit 6.2.2.8 to the snap version I just installed today 7.0.4.2.

So I don't understand why this issue is closed.

I finally today got SANE(xsane) to see my scanner, Cannon PIXMA MG3070S, which only worked with the Scangear MP app supplied by Cannon, now it works with all apps using SANE - except for Libreoffice.

I don't see any solution in this thread so why close the issue?

In Libreoffice click Insert - media - scan - select source

Nothing happens. No Errors or any popup.

Could you look into this, thank you in advance.

Jan
Comment 58 Mike Kaganski 2021-02-15 06:44:11 UTC
(In reply to Jan Broendum Johansson from comment #57)

Please do not make random changes in the bug tracker, unless you really understand what you are doing.

This issue was about a specific issue specific to Windows and 64-bit, where it was impossible to use 32-bit system TWAIN. It was fixed, and rightfully closed.

It has nothing to do with Linux, and it's normal that similarly-looking issues related to communication to hardware are in fact very different and unrelated on different platforms.

Even if your problem were on Windows, even then this bug should have been kept closed, and a new bug should have been opened, with a See Also pointing to this one.

Bug tracker is a tool for developers to keep track of the status of a specific issue. Please file a new bug, describing your new problem. Thank you!