NAPS2 has been a great alternative to what I've previously used Adobe
Acrobat Interop routines to accomplish for scanning documents into my
Microsoft Access applications. However, there's one thing that I've not
found an alternative for-the ability to split a multi-page PDF. Could NAPS2
do that? Does anyone know anything other than Adobe Acrobat that can
accomplish this?
The most basic request would be just to take a multi-page file and create a bunch of single-page pdf's. Maybe have logic that would take multi-page file named FILE01.PDF and create single-page files named FILE01_001.PDF, FILE01_002.PDF, etc.
A more extensive request would be to create the equivalent of the Adobe Interop methods for InsertPages and DeletePages. Basically you're able to pass parameters to the InsertPages method for the page range from the source file to insert into the desination file at a specific page location. I'm usually inserting them at the end of the destination file, so I check the NumPages property of the file to determine what the last page number is to insert it after. I suppose you could just append it to the end of the destination file and that would take care of how I typically use it. The DeletePages method allows you to delete a page range from a selected file.
I've always been nervous about trusting Adobe Acrobat with these routines as they roll out new versions. This actually happened with Adobe Acrobat 2017, some of my routines no longer worked. If I had an alternative (that didn't require the high cost of an Adobe Acrobat license), I'd be a happy guy.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For example, to split a file into all its pages: NAPS2.Console -i "something.pdf" -n 0 -o "page$(n).pdf" --split
To append PDF B to PDF A: NAPS2.Console -i "a.pdf;b.pdf" -n 0 -o "a.pdf"
Or to insert PDF B into PDF A after the fifth page: NAPS2.Console -i "a.pdf[:5];b.pdf;a.pdf[5:]" -n 0 -o "a.pdf"
Last edit: Ben Olden-Cooligan 2018-03-04
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ben, this sounds like it will cover the bases! Great work!
It'll take a little time for me to test this out. I'll let you know what I
discover.
Thanks again!
From: Ben Olden-Cooligan [mailto:ben-cyanfish@users.sourceforge.net]
Sent: Saturday, March 3, 2018 11:11 PM
To: [naps2:discussion]general@discussion.naps2.p.re.sourceforge.net
Subject: [naps2:discussion] Wish List Item
For example, to split a file into all its pages:
NAPS2.Console -i "something.pdf" -n 0 -o "page${n}.pdf" --split
To append PDF B to PDF A:
NAPS2.Console -i "a.pdf;b.pdf" -n 0 -o "a.pdf"
Or to insert PDF B into PDF A after the fifth page:
NAPS2.Console -i "a.pdf[:5];b.pdf;a.pdf[5:]" -n 0 -o "a.pdf"
NAPS2 has been a great alternative to what I've previously used Adobe
Acrobat Interop routines to accomplish for scanning documents into my
Microsoft Access applications. However, there's one thing that I've not
found an alternative for-the ability to split a multi-page PDF. Could NAPS2
do that? Does anyone know anything other than Adobe Acrobat that can
accomplish this?
Tracy Smith
NAPS2 has the basic capability. You can import the PDF, then use the Save Selected option under the Save PDF menu to save each piece.
Thanks for the quick response, Ben. I need to be able to automate it. Is there a command line option for this that I've just not noticed?
Not at the moment. How would you want that to work? Just save N pages into N files?
The most basic request would be just to take a multi-page file and create a bunch of single-page pdf's. Maybe have logic that would take multi-page file named FILE01.PDF and create single-page files named FILE01_001.PDF, FILE01_002.PDF, etc.
A more extensive request would be to create the equivalent of the Adobe Interop methods for InsertPages and DeletePages. Basically you're able to pass parameters to the InsertPages method for the page range from the source file to insert into the desination file at a specific page location. I'm usually inserting them at the end of the destination file, so I check the NumPages property of the file to determine what the last page number is to insert it after. I suppose you could just append it to the end of the destination file and that would take care of how I typically use it. The DeletePages method allows you to delete a page range from a selected file.
I've always been nervous about trusting Adobe Acrobat with these routines as they roll out new versions. This actually happened with Adobe Acrobat 2017, some of my routines no longer worked. If I had an alternative (that didn't require the high cost of an Adobe Acrobat license), I'd be a happy guy.
I've added this to NAPS2.Console in the latest version (5.7.1). Have a look at these parts of the doc:
www.naps2.com/doc-command-line.html#split-options
www.naps2.com/doc-command-line.html#slicing-imported-files
For example, to split a file into all its pages:
NAPS2.Console -i "something.pdf" -n 0 -o "page$(n).pdf" --splitTo append PDF B to PDF A:
NAPS2.Console -i "a.pdf;b.pdf" -n 0 -o "a.pdf"Or to insert PDF B into PDF A after the fifth page:
NAPS2.Console -i "a.pdf[:5];b.pdf;a.pdf[5:]" -n 0 -o "a.pdf"Last edit: Ben Olden-Cooligan 2018-03-04
Ben, this sounds like it will cover the bases! Great work!
It'll take a little time for me to test this out. I'll let you know what I
discover.
Thanks again!
From: Ben Olden-Cooligan [mailto:ben-cyanfish@users.sourceforge.net]
Sent: Saturday, March 3, 2018 11:11 PM
To: [naps2:discussion] general@discussion.naps2.p.re.sourceforge.net
Subject: [naps2:discussion] Wish List Item
I've added this to NAPS2.Console. Have a look at these parts of the doc:
www.naps2.com/doc-command-line.html#split-options
http://www.naps2.com/doc-command-line.html#split-options
www.naps2.com/doc-command-line.html#slicing-imported-files
http://www.naps2.com/doc-command-line.html#slicing-imported-files
For example, to split a file into all its pages:
NAPS2.Console -i "something.pdf" -n 0 -o "page${n}.pdf" --split
To append PDF B to PDF A:
NAPS2.Console -i "a.pdf;b.pdf" -n 0 -o "a.pdf"
Or to insert PDF B into PDF A after the fifth page:
NAPS2.Console -i "a.pdf[:5];b.pdf;a.pdf[5:]" -n 0 -o "a.pdf"
Wish List Item
https://sourceforge.net/p/naps2/discussion/general/thread/b4236850/?limit=2 5#f5d6
Sent from sourceforge.net because you indicated interest in
https://sourceforge.net/p/naps2/discussion/general/
To unsubscribe from further messages, please visit
https://sourceforge.net/auth/subscriptions/