Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging more than 64 files fails #14

Closed
CreateRandom opened this issue Nov 18, 2019 · 3 comments
Closed

Merging more than 64 files fails #14

CreateRandom opened this issue Nov 18, 2019 · 3 comments

Comments

@CreateRandom
Copy link

Hello,

I'm trying to merge around 300 single page PDFs into a single file. I used the following command

pdfjam *.pdf --nup '2x1' --landscape --outfile merged.pdf --no-tidy

This fails with a The call to /home/username/bin/pdflatex resulted in an error.

The last line in the log file reads: !pdfTeX error: pdflatex (file /var/tmp/pdfjam-bg2gZJ/source-64.pdf): reading im age file failed ==> Fatal error occurred, no output PDF file produced!

Inspecting the temporary PDF file shows it is empty, as are all the temporary files whose index is greater than 64. I'm using the most recently released version of pdfjam on Ubuntu 19.10 (copied the binary directly from here). I could also observe this behaviour with version 2.08 that is shipped in the texlive-utils.

Is this some known limitation or possibly just some variable that overflows? Thanks for looking into this.

@DavidFirth
Copy link
Collaborator

DavidFirth commented Nov 18, 2019

I have not seen this myself --- it's not a known limitation (to me, anyway). It looks like it could maybe be a limitation of pdflatex (on your system?). Two things you might try, if using v3.02 or later of pdfjam:

  • specify a different engine in place of pdflatex, by for example --latex /usr/bin/xelatex or --latex /usr/bin/lualatex; or
  • see the FAQ (in the README) about 'Too many open files'. (A bit of a long shot, perhaps)

I hope that helps. Please do let me know if either of those suggestions works for you.

@CreateRandom
Copy link
Author

Thanks for your quick and helpful reply! I tried switching out the backend and inserting the preamble, but to no avail. Only then I noticed the reasons the files were empty: I had assumed that something had gone wrong during copying into the temp folder, but these are not copies in there, but links. I had a couple files that were empty to due an unrelated error during PDF creation. Due to the magic number 64, it just seemed more likely that the error was on the end of pdfjam, but it really wasn't. Great tool by the way, really appreciate it!

@DavidFirth
Copy link
Collaborator

Thanks. A happy resolution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants