MBS TWAIN question

  1. 3 weeks ago

    Christian M

    Apr 11 Pre-Release Testers Germany
    Edited 3 weeks ago by Christian M

    Hello,
    I am using the MBS TWAIN plugin and it works very well so far. I stumbled upon a problem I can not solve. It can be reproduced when using the „Twain.rbp“ example project which comes with the plugin. When pushing then „Aquire without GUI“-button and there is no paper in the feeder of the scanner then a messagedialog appears. The messagedialog tells me, that there is no paper in the feeder and I can click „OK“ to retry or „Cancel“ to close the messagedialog. When I click the „Cancel“-button and the messagedialog closes, then it is not longer possible to scan images. The „Aquire without GUI“-button does nothing after that. What should I do to make scanning possible, even if there was no paper in the feeder and the user closed the messagedialog by clicking the cancel/abort button?

    Thanks in advance,
    Christian

  2. Christian M

    Apr 11 Pre-Release Testers Germany

    Ok,
    it seems that the datasource is still opened after clicking the "Cancel"-button in the messagedialog. After closing the the messagedialog with the "Cancel"-button then I get t.Conditioncode = 5. So if I check the conditioncode before calling t.Aquire and t.Conditioncode = 5 I can disable and close the datasource in advance. After disabling and closing the datasource t.Aquire woks correctly and scanning is possible again. Is this the correct solution to this problem?

  3. Christian S

    Apr 11 Pre-Release Testers, Xojo Pro Europe (Germany)

    Well, it sounds right.
    You probably just confused the data source.

  4. Christian S

    Apr 11 Pre-Release Testers, Xojo Pro Europe (Germany)

    On the long run, please move to ImageCapture on Mac and WIA on Windows.
    TWAIN is 32-bit only in most cases.

  5. Christian M

    Apr 11 Pre-Release Testers Germany

    Hello Christian,
    thanks for your replies.
    For document scanning applications TWAIN is the most used / recommended solution. I think I read somewhere, that you also will support TWAIN 64-Bit in the future.

  6. Christian S

    Apr 11 Pre-Release Testers, Xojo Pro Europe (Germany)

    MBS Plugin can do 64-bit TWAIN, but you may not find drivers in 64-bit!

  7. Christian M

    Apr 11 Pre-Release Testers Germany

    Ok, I understand. The scanners I tested at my university come with TWAIN compatible drivers so for the moment TWAIN is currently the best solution for what we have. But I will also take a look at WIA and ImageCapture for the future.

  8. Jean-Yves P

    Apr 11 Pre-Release Testers, Xojo Pro Europe (France, Besancon)

    take a look at the sanescanner app from Axel. for mac or linux only.
    https://forum.xojo.com/26909-old-scanner

  9. Christian M

    Apr 12 Pre-Release Testers Germany

    Hello Jean-Yves,
    thanks for your suggestion. I already did some experiments with SANE. While with SANE somehow I was able to use the scanners I tested, some features simply did not work. For example duplex scanning and auto-feed did not work at all with our scanners. It even happened that the whole Mac freezed when using SANE and a reboot was needed.
    On the other hand the TWAIN MBS plugin works very well with our scanners. Currently only Windows and Mac support is needed for our scanning solution.

  10. Christian S

    Apr 12 Pre-Release Testers, Xojo Pro Europe (Germany)

    Well we offer a lot of properties but using them may set error properly and the error often is "Function not implemented" as a lot of drivers skip some features.

  11. last week

    Christian M

    Apr 21 Pre-Release Testers Germany

    Hello,
    I stumbled upon a new question. From some scanners I only get a portion of the A4 page I try to scan. When using TwainImageInfoMBS and checking the width and length of the transfered image then it shows that the images with and length are too small (for example 850 x 1167 pixels instead of 2480 x 3508 pixels).
    How do I tell the scanner, that it should scan an area of 2480 x 3508 pixels? I see that TwainImageLayotMBS has Left, Right, Top and Bottom properties which maybe could be the solution. But I seem to not understand how to use this. If we take for examle the „Twain.rbp“ example project, how would I tell there the scanner to scan an area of 2480 x 3508 pixels?

  12. Christian M

    Apr 21 Pre-Release Testers Germany

    Addition to my last question: The bespoke scanners deliver (when using the „Twain.rbp“ example) the whole scanned page when calling Aquire(FALSE, TRUE) which means that the scanners dialog is shown before the scan starts, but only a portion or the scanned page when calling Aquire(FALSE, FALSE) which means that no dialog is shown before the scan starts.

  13. Christian S

    Apr 21 Pre-Release Testers, Xojo Pro Europe (Germany)

    Do the scanners do some auto detection and maybe remove borders?

  14. Christian M

    Apr 21 Pre-Release Testers Germany
    Edited last week by Christian M

    Hello,
    I have:

    t.AutomaticRotate = 1
    t.FeederEnabled = 1
    t.AutoFeed = 1
    t.AutomaticBorderDetection = 1
    t.DiscardBlankPages = 1
    t.Duplex = 1
    t.Orientation = 0
    t.PixelType = 0
    t.ResX = 300.0
    t.ResY = 300.0

    Edit: But when I use the „Twain.rbp“ example (where nothing is set) I get the same result. For the moment I cant not conitnue testing because I have no access to the scanners until next week.

  15. Christian S

    Apr 21 Pre-Release Testers, Xojo Pro Europe (Germany)

    t.AutomaticBorderDetection maybe?

  16. Christian M

    Apr 21 Pre-Release Testers Germany

    Hello Christian,
    thanks for your reply. I think I changed that setting already without effect but I can try again next week.

or Sign Up to reply!