Feat: join_pdf work
This commit is contained in:
17
bopytex/worker/join_pdf.py
Normal file
17
bopytex/worker/join_pdf.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import subprocess
|
||||
|
||||
def pdfjam(args: dict, deps, output):
|
||||
joining_process = subprocess.Popen(
|
||||
["pdfjam"] + deps + ["-o", output],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
universal_newlines=True,
|
||||
)
|
||||
# exit_code is always 66...
|
||||
exit_code = joining_process.wait()
|
||||
|
||||
if exit_code == 0:
|
||||
yield "pdfjam success"
|
||||
else:
|
||||
yield "pdfjam failed"
|
||||
|
Reference in New Issue
Block a user