Timeline for How do I 'unbook' a pdf
Current License: CC BY-SA 3.0
10 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 13, 2017 at 12:36 | history | edited | CommunityBot |
replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
|
|
| S Feb 9, 2016 at 8:55 | history | suggested | Gavin S. Yancey | CC BY-SA 3.0 |
Fix typo in command
|
| Feb 9, 2016 at 8:40 | review | Suggested edits | |||
| S Feb 9, 2016 at 8:55 | |||||
| Jun 7, 2012 at 19:17 | vote | accept | TSGM | ||
| Jun 7, 2012 at 8:35 | history | edited | Gilles 'SO- stop being evil' | CC BY-SA 3.0 |
added shebang line
|
| Jun 7, 2012 at 8:34 | comment | added | Gilles 'SO- stop being evil' |
@TSGM The code assumes a layout of 1|4 obverse, 2|3 reverse, which is the usual book layout. You may need to tweak it if your pages are laid out differently. It was field-tested in that setting. Your having to explicitly call python was my mistake: I should have put a shebang line, added.
|
|
| Jun 7, 2012 at 1:24 | comment | added | TSGM | The problem was that I was supposed to call python via "python unbook <in.pdf >out.pdf". Silly me. Also, your code was a bit strange (it was sticking the second_half pages all at the end. I seem to have corrected it for the format that I wrote in the original post). I've edited my original response to contain the code I eventually used. Also, the page size commands seem to be wrong. I corrected that as well. @Gilles | |
| Jun 6, 2012 at 22:01 | comment | added | Gilles 'SO- stop being evil' |
@TSGM The most probable explanation is that you forgot the < before the input file. If you're really absolutely sure that you wrote the command correctly, it could be a bug in the PyPdf library (it hasn't failed me yet, but it could happen).
|
|
| Jun 6, 2012 at 21:53 | comment | added | TSGM | This was asked some time ago, but I'm having trouble implementing your solution. I'm running OSX, have installed python and py27-pypdf via MacPorts. I created an unbook file and copied and pasted the script. Running the command as instructed creates a new 1up.pdf file with 0 bytes. No error or anything is listed in my terminal, but upon executing the command, nothing happens (I have to CTRL-C out); the system does not hang and does not appear to be doing anything. How can I track down the problem? @Gilles | |
| Jan 22, 2012 at 22:20 | history | answered | Gilles 'SO- stop being evil' | CC BY-SA 3.0 |