mirror of
https://github.com/gotson/komga.git
synced 2026-05-07 12:01:40 +02:00
fix: use temp files for PDF when getting entries
This commit is contained in:
parent
f602218315
commit
deb8e5fff4
1 changed files with 1 additions and 1 deletions
|
|
@ -34,7 +34,7 @@ class PdfExtractor : MediaContainerExtractor {
|
||||||
override fun mediaTypes(): List<String> = listOf("application/pdf")
|
override fun mediaTypes(): List<String> = listOf("application/pdf")
|
||||||
|
|
||||||
override fun getEntries(path: Path, analyzeDimensions: Boolean): List<MediaContainerEntry> =
|
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 ->
|
(0 until pdf.numberOfPages).map { index ->
|
||||||
val page = pdf.getPage(index)
|
val page = pdf.getPage(index)
|
||||||
val scale = page.getScale()
|
val scale = page.getScale()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue