mirror of
https://github.com/gotson/komga.git
synced 2025-01-09 04:08:00 +08:00
fix: use temp files for PDF when getting entries
This commit is contained in:
parent
f602218315
commit
deb8e5fff4
@ -34,7 +34,7 @@ class PdfExtractor : MediaContainerExtractor {
|
||||
override fun mediaTypes(): List<String> = listOf("application/pdf")
|
||||
|
||||
override fun getEntries(path: Path, analyzeDimensions: Boolean): List<MediaContainerEntry> =
|
||||
PDDocument.load(path.toFile()).use { pdf ->
|
||||
PDDocument.load(path.toFile(), MemoryUsageSetting.setupTempFileOnly()).use { pdf ->
|
||||
(0 until pdf.numberOfPages).map { index ->
|
||||
val page = pdf.getPage(index)
|
||||
val scale = page.getScale()
|
||||
|
Loading…
Reference in New Issue
Block a user