simon-knuth / scanner

An all-in-one scanner app built for the Universal Windows Platform

Home Page:https://simon-knuth.github.io/scanner/index

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Scan file to PDF creating 0 KB files

mcain1018 opened this issue · comments

Describe the bug

To Reproduce

Expected behavior

Screenshots

Log data

Somehow it is working fine for every other single thing I scan. It is doing this ONLY with the one particular file, which makes no sense, seeing as this file was exactly the same as my other case from today. Same documents, same number of pages, only difference was name and the personal information written on the forms. Oh well, it's working.

Now having same issue again. I am now unable to access anything that I scan. The files are technically saving, but with
out data, 0KB.

commented

Hi there, please attach some logs so I can take a look (see the feedback section in the settings). I'd also be very interested in seeing what your %LocalAppData%\Packages\9390SimonKnuth.ScannerforWindows10_69n05hp4v3s90\TempState\Conversion folder looks like right after a scan. That's the folder where the app puts all images before launching the PDF generator.

log20220321.txt
log20220320.txt
log20220318_003.txt
log20220318_001.txt
log20220318.txt

Very strange, these show the file size they should have saved as.

Not sure how to get to %LocalAppData%\Packages\9390SimonKnuth.ScannerforWindows10_69n05hp4v3s90\TempState\Conversion

Computers are a lot more complicated nowadays. I used to be able to navigate and troubleshoot so easily. But now, I feel like a 5 year old looking at calculus, totally clueless.

commented

Damn, I'm sorry, I really should have explained that in more detail: %LocalAppData%\Packages\9390SimonKnuth.ScannerforWindows10_69n05hp4v3s90\TempState\Conversion is a path that points to a private folder my app uses to save temporary data when processing scans. If you paste this path into the address bar in File Explorer, you should hopefully be able to view this folder. It should contain the image files used for the PDF generator.

Thank you for providing the logs, I'll try and take a look as soon as I can :)

I will search that now, I still need to better acquaint myself with this computer. I did notice that the event logs from the scan app are showing the file sizes that they should be saving as. Somewhere between me saving the file and then opening File Explorer to choose the document is where the failed process is happening. I did just make a very strange discovery also. If I scan all pages at same time (this last file I did was 7 pages, used the feeder tray to scan), then the same thing happens, end up with 0KB file. But, then, I scanned 2 pages first (still using feeder), then did the last 5 one page at a time (kept selecting the +SCAN button to add to the file), and then it successfully saved as 3,768 KB. I have to say, I have dealt with a lot of very agitating computer issues, but this one really takes the cake. I am officially stumped. I have literally done every single possible thing I can think of and every single idea I could find via internet search too. I am really hoping for an actual solve on this one, because having to scan files that way will drive me insane, and quickly, LMAO!

2022-03-21

No luck with that file search.

Hi,

unfortunately I am experiencing the exact same issue. Scan works fine. There are also image files under C:\Users\myusername\AppData\Local\Packages\9390SimonKnuth.ScannerforWindows10_69n05hp4v3s90\TempState\Conversion, but the generated PDF has 0kB.

OS is Windows 11.

I found this line in the log (error is German, but I figure that's not an issue for you ^^):
{"Timestamp":"2022-03-23T11:09:06.5389850+01:00","Level":"Error","MessageTemplate":"FullTrustProcess returned an error. (Fehler beim Vergleichen von zwei Elementen im Array. | bei System.Collections.Generic.ArraySortHelper1.Sort(T[] keys, Int32 index, Int32 length, IComparer1 comparer)\r\n bei System.Array.Sort[T](T[] array, Int32 index, Int32 length, IComparer1 comparer)\r\n bei System.Collections.Generic.List1.Sort(Int32 index, Int32 count, IComparer1 comparer)\r\n bei ImageToPDF.Program.d__5.MoveNext())"}`

Full log: log20220323.txt

Love your app btw!

commented

@mcain1018 @Simon-Hohberg
Thank you both very much, I think that's all the information I need. I've got a strong suspicion why this is happening and I'll get it fixed as soon as possible. I hope to release an update this week to prevent too many users from ending up with these empty files.

It appears that compressing the images prior to generating the PDF had an unintended side effect, causing the PDF generator to be unable to determine the correct order of the pages. This results in an empty PDF file.

commented

I fixed this in the latest v3.1.1 release. The behavior is a bit tricky, so please let me know if you still encounter this issue when starting a new PDF or adding pages to an existing one. For more details see here.

@simon-knuth
Thank you so much for being so quick and diligent in fixing this issue. So far, app is working exactly as it should be, haven't had any empty files since installing this latest update. I absolutely love this application by the way, it has truly made my work much easier and quicker. Thank you again!

commented

You're very welcome, I'm happy to hear the app's helping you be more productive