-
Notifications
You must be signed in to change notification settings - Fork 309
Syntax for merging entire PDF files #11
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
Comments
I'm afraid there isn't a way to do it without the 1-z, but you can use a trick like this:
The syntax above would work with bash or any Bourne-shell or Korn-shell compatible shell. Will that meet your needs? |
Yes, that's a neat idea. I will use that for now. Would it be possible to add the ability to do it directly in the future? I find myself often needing to combine entire pdf files on the command line. Thanks. |
I'll put it on the to-do list. It should be doable without creating any significant ambiguity. Thanks for the suggestion. |
I'll leave the issue open and will resolve it if/when I add this to a future version. |
This issue is targeted for 4.2.0 which I hope to get out within the week. |
I have implemented this change. I'm closing this issue. 4.2.0 is ready to go, a little later than I hoped. |
Hi, can you post the syntax to do this so myself and others visiting this issue from google know how to do this as of 4.2.0? |
You can now do qpdf --empty --pages *.pdf -- out.pdf |
Thanks Jay |
In qpdf 6.0.0, if i use So every time I need to specify the name of files (like "qpdf --empty --pages a1.pdf a2.pdf -- out.pdf"). |
What operating system or shell are you using? This will only work on a UNIX/Linux like system that does wildcard expansion in the shell. If you are using this on Windows, it will not work. |
I use Windows. |
Hello X1z1, I also use Windows, and I have Cygwin installed in Windows, somehow it emulates a UNIX/Linux like system, it gives you a shell or terminal to work with.
And it worked perfectly. |
Is there an opposite syntax for splitting? That is split all pages of a pdf into separate files while the filenames are enumerated from a template? Because right now I am manually figuring out the number of pages, and then running a page extraction for each page. |
@CMCDragonkai See #30 and #110. I think I'm going to add something soon. |
Any word on how to do this when there are spaces in the PDF filenames? |
qpdf doesn't care what the file names are. If you are having a problem with spaces in file names, it's probably a shell escaping problem. If you are having too much trouble getting your shell to escape things properly, you can put each argument, one argument per line, in a file and use |
I don't seem to understand the syntax: I try to use |
@devurandom You need an input file. It's treating out.pdf as the input file. If you don't have an input file, you can use |
Alternatively, you can repeat primary-document.pdf for |
Windows/PowerShell users also need to put quotes around the For example, running this: qpdf --empty --pages input.pdf -- output.pdf Results in this error:
The correct syntax for PowerShell is this: qpdf --empty --pages input.pdf '--' output.pdf |
hello dear all i just run into terrible issues: see here for more deatails: https://www.linuxquestions.org/questions/showthread.php?p=6151676#post6151676
now i finally encountered that there something is totally wrong with my system: i cannot copy and paste commands - this does not work here. so i finally do one thing: i will type all the commands character by character... question: should i type each of the four lines - i guess so. i guess that i need all the four lines. look forward to hear from you - either here or there https://www.linuxquestions.org/questions/showthread.php?p=6151676#post6151676 |
If I needed to merge the entire a1.pdf and a2.pdf into b.pdf, is the best way to do it with:
qpdf --empty --pages a1.pdf 1-z a2.pdf 1-z -- b.pdf
Is there a way it can be called without specifying 1-z for each page? It would ideal if I could call it with something like:
qpdf --empty --pages a1.pdf a2.pdf -- b.pdf
which would then allow me to call it with wildcards like:
qpdf --empty --pages a*.pdf -- b.pdf
Thanks for your help.
The text was updated successfully, but these errors were encountered: