Description
When running Kavita on Alpine Linux, PDF files can't be read, have a length of 0 and are without a cover.
To Reproduce Steps to reproduce the behavior:
- Run Alpine linux
- Download latest kavita-linux-musl-x64 release
- Install dependencies on alpine (noted below)
- Add library with PDF file
Error message
Error messages when a library with a PDF file is scanned (first warning) and Kavita tries to generate a cover (second warning)
warn: API.Services.BookService[0]
[BookService] There was an exception getting number of pages, defaulting to 0
System.DllNotFoundException: Unable to load shared library 'pdfium' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: Error loading shared library libpdfium: No such file or directory
at Docnet.Core.Bindings.fpdf_view.__Internal.FPDF_InitLibrary()
at Docnet.Core.Bindings.fpdf_view.FPDF_InitLibrary()
at Docnet.Core.DocLib..ctor()
at Docnet.Core.DocLib.get_Instance()
at API.Services.BookService.GetNumberOfPages(String filePath) in C:\Users\josep\Documents\Projects\KavitaOrg\Kavita\API\Services\BookService.cs:line 485
info: API.Services.Tasks.Scanner.ProcessSeries[0]
[ScannerService] Finished series update on Sanders, Rob in 436 ms
warn: API.Services.BookService[0]
[BookService] There was a critical error and prevented thumbnail generation on /tmp_alpine_kavita/pdf/Sanders, Rob/Total War_ Lords of Chaos/Total War_ Lords of Chaos - Rob Sanders.pdf. Defaulting to no cover image
System.DllNotFoundException: Unable to load shared library 'pdfium' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: Error loading shared library libpdfium: No such file or directory
at Docnet.Core.Bindings.fpdf_view.__Internal.FPDF_InitLibrary()
at Docnet.Core.Bindings.fpdf_view.FPDF_InitLibrary()
at Docnet.Core.DocLib..ctor()
at Docnet.Core.DocLib.get_Instance()
at API.Services.BookService.GetPdfCoverImage(String fileFilePath, String fileName, String outputDirectory) in C:\Users\josep\Documents\Projects\KavitaOrg\Kavita\API\Services\BookService.cs:line 911
info: API.Services.MetadataService[0]
[MetadataService] Updated covers for Sanders, Rob in 28 milliseconds
Expected behavior The PDF should be readable and have a cover
Screenshots
Looks like this in the web interface
The file can't be opened, with an error that Kavita can't read the archive

Desktop (please complete the following information):
- OS: Alpine 3.16.2
Additional repositories were enabled to get all dependencies (pretty much copied from Ubuntu Dockerfile).
Here's the /etc/apk/repositories file
http://eu.edge.kernel.org/alpine/v3.16/main
http://eu.edge.kernel.org/alpine/v3.16/community
@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing
Installing dependencies:
apk add icu-dev libssl1.1 curl libgdiplus@testing
Additional context
I did try the method of removing libvips.so.42 as noted in this issue here
The vips package was installed to provide the library instead. No change.
Alpine uses musl libc instead of glibc.
The CPU I use to run alpine supports sse4_2 (marked with stars)
alpine-test:/kavita# cat /proc/cpuinfo | grep sse4_2
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid tsc_known_freq pni pclmulqdq ssse3 fma cx16 sse4_1 **sse4_2** x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext ssbd ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 xsaves clzero arat overflow_recov succor
OS Release output
alpine-test:/kavita# cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.16.2
PRETTY_NAME="Alpine Linux v3.16"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"