Kareadita / Kavita

Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.
http://www.kavitareader.com
GNU General Public License v3.0
6.43k stars 341 forks source link

Covers not generated for some pdf files #3150

Open LittleOne3 opened 2 months ago

LittleOne3 commented 2 months ago

What happened?

Unable to see some of the covers for the PDFs.

What did you expect?

The first page of the pdf is to be shown as the cover, as produced in earlier Kavita versions.

Kavita Version Number - If you don not see your version number listed, please update Kavita and see if your issue still persists.

0.8.2 - Stable

What operating system is Kavita being hosted from?

Docker (Other)

If the issue is being seen on Desktop, what OS are you running where you see the issue?

Windows

If the issue is being seen in the UI, what browsers are you seeing the problem on?

Chrome

If the issue is being seen on Mobile, what OS are you running where you see the issue?

Android

If the issue is being seen on the Mobile UI, what browsers are you seeing the problem on?

Chrome

Relevant log output

[Kavita] [2024-09-02 10:15:31.761 -07:00  184] [Debug] API.Services.MetadataService [MetadataService] Generating cover image for /library/learn/Encyclopedia/DK - Super Shark Encyclopedia {2015}.pdf
[Kavita] [2024-09-02 10:15:34.751 -07:00  184] [Warning] API.Services.BookService [BookService] There was a critical error and prevented thumbnail generation on /library/learn/Encyclopedia/DK - Super Shark Encyclopedia {2015}.pdf. Defaulting to no cover image
NetVips.VipsException: unable to call thumbnail_image
pngload_source: IDAT stream error

   at NetVips.Operation.Call(String operationName, VOption kwargs, Image matchImage, Object[] args)
   at API.Services.ImageService.WriteCoverThumbnail(Stream stream, String fileName, String outputDirectory, EncodeFormat encodeFormat, CoverImageSize size) in /home/runner/work/Kavita/Kavita/API/Services/ImageService.cs:line 235
   at API.Services.BookService.GetPdfCoverImage(String fileFilePath, String fileName, String outputDirectory, EncodeFormat encodeFormat, CoverImageSize size) in /home/runner/work/Kavita/Kavita/API/Services/BookService.cs:line 1255

Additional Notes

I am currently running Kavita on Qnap Docker.

contributor commented 2 months ago

Same here, 0.8.2, fresh install (docker on Synology DSM7). The covers have not been generated for 57 out of 240 pdf books, with the same error in log as above.

Example: free book Under the Hood of .NET Memory Management - direct link, 6.6MB