jenom / pdfbook2

Create booklets from PDF files
GNU General Public License v3.0
60 stars 13 forks source link

FileNotFoundError for .crop-tmp-book.pdf #22

Closed harmtemolder closed 9 months ago

harmtemolder commented 9 months ago

When I try to run pdfbook2 I get a FileNotFoundError:

pdfbook2 --paper=a4paper 7_wonders_duel_Campaign_book_Digital_v1.0.pdf

    pdfbook2 v1.4 (https://github.com/jenom/pdfbook2)
    (c) 2015 - 2020 Johannes Neumann (http://www.neumannjo.de)
    licensed under GPLv3 (http://www.gnu.org/licenses/gpl-3.0)
    based on pdfbook by David Firth with help from Marco Pessotto

Processing 7_wonders_duel_Campaign_book_Digital_v1.0.pdf
Getting bounds... done
cropping... done
create booklet... Traceback (most recent call last):
  File "/usr/bin/pdfbook2", line 318, in <module>
    booklify(arg, opts)
  File "/usr/bin/pdfbook2", line 161, in booklify
    os.rename(tmpFile[:-4] + "-book.pdf", name[:-4] + "-book.pdf")
FileNotFoundError: [Errno 2] No such file or directory: '.crop-tmp-book.pdf' -> '7_wonders_duel_Campaign_book_Digital_v1.0-book.pdf'

I checked, and .crop-tmp-book.pdf does not exist. There is a .crop-tmp.pdf.

How can I fix this?

harmtemolder commented 9 months ago

I tried running the pdfjam command myself and received the following error:

pdfjam --landscape --suffix=book --booklet=true --paper=a4paper .crop-tmp.pdf 
          ----
  pdfjam: This is pdfjam version 3.03.
  pdfjam: Reading any site-wide or user-specific defaults...
          (none found)
  pdfjam: No PDF/JPG/PNG source specified: input is from stdin.
  pdfjam ERROR: LaTeX package pdfpages.sty is not installed

https://askubuntu.com/questions/1011023/pdfjam-error-latex-package-pdfpages-sty-is-not-installed led me to yay -Sy texlive-latexrecommended (I'm on Manjaro, not Ubuntu). That solved it