manga-download / haruneko

Prototype of HakuNeko based on NW.js + TypeScript
https://haruneko-docs.pages.dev
100 stars 30 forks source link

Better PDF/CBR/CBZ/EPUB generation ? #460

Open MikeZeDev opened 6 months ago

MikeZeDev commented 6 months ago

1) Begin able to generate PDF for VOLUMES and not CHAPTERS.

Ofc we aint gonna guess which chapters for which volume. User select downloaded chapters from the UI, right click, generate => PDF.

2) Afaik PDFKIT library is NOT able to handle WEBP. Find a PDF library that we can integrate AND being able to deal with WEBP, or convert WEBP before processing?

Sheepux commented 6 months ago

Split this enhancement request in 2 separate ones: 1) "Merge downloads together" ( volume or ....) 2) Better pdf library

MikeZeDev commented 5 months ago

Note : good old PDFKit got the problem with PNG + it cant handle WEBP, which are major problems.

ronny1982 commented 5 months ago

To the best of my knowledge the latest version of PDF specs (2020) does still not include support for WebP, therefore it has to be converted to PNG/JPEG.

Murshid7absi commented 4 months ago

maybe this can help for PDF libraries: https://byby.dev/js-pdf-libs

Sheepux commented 4 months ago

maybe this can help for PDF libraries: https://byby.dev/js-pdf-libs

this doesn't solve the volume (it's not related to the pdf lib but to the way we decide to put content in it). this doesn't solve the webp issue as it's a pdf issue

Murshid7absi commented 3 weeks ago

you can use Pillow library to convert from various image formats. Then use ReportLab or PyMuPDF to create the pdf which also support various formats including WEBP if Pillow doesn't work for you.

Edit: now I see that I suggested a solution for python not typescript. but if you can integrate it maybe it will help idk