Skip to content

Commit

Permalink
replace absolute background path in xopp file with relative path (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kruemmelspalter authored Jan 15, 2023
1 parent 5a2616f commit 47022ef
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,14 @@ class Renderer {
}.outputFile("application/pdf", "pdf") { "out.pdf" }

private val xournalppRenderer =
Renderer().tempDir().command(10) { listOf("xournalpp", "-p", "out.pdf", it.fileName) }
Renderer().tempDir().command(2) {
listOf(
"sh",
"-c",
"gunzip -c -S .${it.document.fileExtension} ${it.fileName} |sed -r -e 's/filename=\".*\\/${it.document.id}\\/(.*)\" /filename=\"\\1\" /g'|gzip>tmp.xopp"
)
}
.command(10) { listOf("xournalpp", "-p", "out.pdf", "tmp.xopp") }
.outputFile("application/pdf", "pdf") { "out.pdf" }

private val ebookRenderer = Renderer().tempDir()
Expand Down

0 comments on commit 47022ef

Please sign in to comment.