There are a couple of ways to handle this.
1. Edit /sbin/peasypdf and comment out line 217. Run Extractor and select the full page range. This would leave all the individual pages in /tmp.
Then run Builder, reassemble them into a new PDF and include your own pages where you want.
2. Or suppose you just wanted to insert an extra page after page 10 of the original.
Using Extractor, cut out pages 1-10 and save them to temporary file #1
Then cut out pages 11-end and save to temporary file #2
Run Builder. Add file #1, your file and file#2.
For large files, Method #2 strikes me as easier. What do you think?
Announcing PeasyP2J
Just downloaded updated peasypdf. Excellent !!rcrsn51 wrote:
Then cut out pages 11-end and save to temporary file #2
Run Builder. Add file #1, your file and file#2.
For large files, Method #2 strikes me as easier. What do you think?
note: ..could probably automate Method #2 into one click. Extract to PDF pages on either side with the added file(s) in the middle--build (or to delete a page, extract to PDF pages on either side of removed page--build). The way it is now, the new -EXT.pdf has to be renamed or it gets over-written.
note: The extract to PDF is a terrific addition!
That certainly does the job. There might be a way to automate the whole thing by just entering a "split" point. There's allegedly an arg called s.Page.End and s.Page.Start, although I haven't figure out how to use them yet. Two pdf's around the split point could be built with some flag name (eg, front/back). The user would just need to enter the included file name, the include page, and press a button....
edit: I guess s.Page.End just equals LastPage. Maybe there's some other way to indicate the last page.
This works:
SP=$SplitPoint (UserEntry)
1-$((SP-1)) --> Front.pdf
$SP-$END --> Back.pdf
(UserEntry) --> Include.file
edit: I guess s.Page.End just equals LastPage. Maybe there's some other way to indicate the last page.
This works:
Code: Select all
END=`pdfinfo Downloads/score.pdf | grep Pages | awk '{print $2}'`
SP=$SplitPoint (UserEntry)
1-$((SP-1)) --> Front.pdf
$SP-$END --> Back.pdf
(UserEntry) --> Include.file
Here's a version of peasypdf with a Split function. Enter the split page in the page number box, and it creates BACK/FRONT pdfs.
This seems to be a simple solution. I can then sandwich anything I want via the builder.
(uses pdfinfo).
This seems to be a simple solution. I can then sandwich anything I want via the builder.
(uses pdfinfo).
- Attachments
-
- peasypdf.tar.gz
- (2.83 KiB) Downloaded 629 times
-
- peasypdf.png
- (32.7 KiB) Downloaded 675 times