I assume many of you host a DMS such as Paperless and use it to organise the dead trees you still receive in the snail mail for some reason in the year of the lord 2023.

How do you encode your scans? JPEG is pretty meh for text even at better quantisation levels ("dirty" artefacts everywhere) and PNGs are quite large. More modern formats don't go into a PDF, which means multiple pages aren't possible (at least not in Paperless).

Discussion on GH: https://github.com/paperless-ngx/paperless-ngx/discussions/3756

top 28 comments

sorted by: hot top controversial new old
[–] 5 points 3 years ago (2 children)

I use JPEGs in a PDF. They can be mediocre quality. Using an OK scanner makes a big difference. It's good enough!

I'm required by law to keep physical paper copies for 35 years. So my parallel solution is a cursed filing cabinet, and several crates that describe the content of the filing cabinet. Its ugly, but saves me tons on data archiving, I guess?

  • source
  • hideshow 4 child comments
  • [–] 2 points 3 years ago

    Paperless has a tracking method for paper copies as well; i think the idea is you assign an archive number, then file it in the expected place (for example, 2023-01 to 2023-500 would be one of the 500 docs you get a year, then you put it in the filing cabinet in order from 1 to 500 under 2023). Then you can still search for document by name tag correspondent etc. in paperless and find the archive number.

  • source
  • parent
  • [–] [S] 1 point 3 years ago* (1 child)

    Using an OK scanner makes a big difference.

    WDYM? The lossless scans SANE produces themselves subjectively look very good. My only issue is the transcoding to lossy formats I want to do in order to save >3/4 of the space.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 3 years ago (2 children)

    Oh, it's common in my country to use a smartphone to 'scan' documents by actually just taking a lousy photo of them. It's so prevalent that when you tell someone to do a scan they usually do this instead.

    I bought a cheap canon scanner for 50$ and it's pretty perfect for legal documents. A little slow maybe. I use SANE, then do lossy compression too.

    In rare situations I'd then post process the PDF to even worse quality using ghostscript, for example when a foreign visa application form requires a scan of a really long document, but doesn't accept sizes over 2MB.

  • source
  • parent
  • hideshow 4 child comments
  • [–] [S] 1 point 3 years ago (2 children)

    I use SANE, then do lossy compression too.

    Well, what kind of lossy compression? JPEG?

    IME, JPEG looks quite terrible for text documents -even at q=95.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 1 point 3 years ago (1 child)

    @Atemu
    I just use grayscale PNGs, myself. optipng usually takes them down to a decent size.
    @Saigonauticon

  • source
  • parent
  • hideshow 2 child comments
  • [–] [S] 1 point 3 years ago (2 children)

    Hmm, I'm using grayscale PNGs as my baseline here. A 150dpi scan is about 1.3MiB.

    A (for the purpose of text documents) similar quality WEBP is about 1/4 of that.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 1 point 3 years ago

    You could also try adjusting the contrast a bit. I use an app called Genius Scan, which increases the contrast of the scanned image to reduce the number of bits needed per pixel. This reduces the size of the file quite a bit, although it obviously isn't a true representation of the scanned document. The TextCleaner imagemagick plugin looks like it's doing something similar.

  • source
  • parent
  • [–] -1 points 3 years ago (1 child)

    @Atemu
    Webp is much better, as long as your target reader(s) support it.

  • source
  • parent
  • hideshow 2 child comments
  • [–] [S] 1 point 3 years ago (1 child)

    Yes, as I said.

    As also mentioned in the post, I need a solution for multiple pages and an image (no matter what format) only represents a single page and WEBPs don't go into PDFs.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 0 points 3 years ago (1 child)

    @Atemu
    There's not really a magic bullet here. The current answer is to prepare a PDF outside of paperless and feed it in: https://github.com/paperless-ngx/paperless-ngx/discussions/367

    mpflanzer on that Issue is working on a file merging feature, but it's not ready yet.

  • source
  • parent
  • hideshow 2 child comments
  • [–] [S] 1 point 3 years ago

    That's nice and all but does not answer how you'd create the PDF. Whether that happens outside paperless inside paperless does not make a difference. In the end, I need to create a PDF/A out of some images and the question on how to encode these images still remains.

  • source
  • parent
  • [–] 3 points 3 years ago* (last edited 3 years ago) (1 child)

    I’ve never used paperless but just checked it out and it looks pretty neat. My first thought would be to scan documents in a higher resolution, let the OCR happen, then convert the file to a JPEG or something smaller after you’ve extracted the text.

    I spent a few minutes looking at their wiki and it looks like it might be possible.

    Like I said though, no experience with this software so I’m not sure that’d actually work.

  • source
  • hideshow 2 child comments
  • [–] [S] 4 points 3 years ago (1 child)

    Interesting idea but I think I'd like to retain similar to original quality in case I wanted to redo OCR if/when Paperless' OCR improves in the future.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 2 years ago (1 child)
  • [–] [S] 2 points 2 years ago (1 child)

    Correct. That's the currently maintained paperless project.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 3 years ago (1 child)

    There is the DJVU format for this exact use case, but you'd need to convert them to, say, pdf for many use case. Its also a bit old and perhaps not maintained, soo..

    HEIF and other modern video encoders (HEIF=H265) should fare a lot better than JPEG, though.

  • source
  • hideshow 2 child comments
  • [–] [S] 1 point 3 years ago

    Hm, DJVU seems like an ancient format and it also only supports JPEG and J2K as far as lossy formats go.

    I'd love to use more modern formats such as AVIF, HEIF or even WEBP but paperless doesn't support some of them and images in general can only represent one page while many of my scans have multiple pages.

  • source
  • parent
  • [–] 0 points 3 years ago (1 child)
  • [–] [S] 1 point 3 years ago (1 child)

    And how do you encode the images of the scan contained in the PDF/A? That's the crux here.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 3 years ago (1 child)

    I'm not sure I understand. I just scan anything and let my software spit out PDF/A

  • source
  • parent
  • hideshow 2 child comments
  • [–] [S] 1 point 3 years ago (1 child)

    PDF/A is not an image format. As a document, it may contain images.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 3 years ago* (1 child)

    My PDF/A documents contain all kinds of content, including text and images. To me, it doesn't matter what format the encoded images are, as long as I can open them 20 years from now. Why would one care one way or another?

  • source
  • parent
  • hideshow 2 child comments
  • [–] [S] 1 point 3 years ago

    I care that the text remains readable (both to me and also software) and that I don't balloon my storage out of control.

    JPEG (even at higher levels) subjectively degrades text in particular to a degree that I worry about the former and PNG makes me worry about the latter.

    My current plan is to go with the latter since storage is a relatively cheap issue to fix while data loss is pretty much permanent.

  • source
  • parent
  • load more comments
    view more: next ›