How to split into individual or reorder the pages in to Single PDF

How to split into individual or reorder if the page numbers are as follows

Have a PDF in the following sequence

1st - 46th page on the left & 1st page on the right

2nd - 2nd page on the left and 45th page on the right

3rd - 44th page on the left and 3rd page on the right

4th - 4th page on the left and 43rd page on the right

I want the PDF to be converted into the sequential order

1, 2, 3, 4, 5

I am having Adobe Acrobat DC.

Please let me know how to convert this PDF to the sequential pages into a SINGLE PDF file.

If Single PDF file with all the pages in sequential is not possible, atleast need a way to split to individual files with correct sequence number of PDF files. so that we can re-join them again.
Software ProgrammerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

JohnBusiness Consultant (Owner)Commented:
Open the file in Adobe Acrobat, Tools, Organize pages and sort / move them any way you wish. Check the result and save the file.
coolutils worksCommented:
Are you looking for a batch solution or for a manual one?
Joe Winograd, Fellow&MVEDeveloperCommented:
What do you mean by "on the left" and "on the right"? For example, are there two portrait A4 pages on the left side and right side of a landscape A3 page, and what you want to do is split each A3 page into two A4 pages, and then put the split pages in sequential order? If not, please explain "left" and "right".

Also, I don't understand these items in your question:

2nd - 2nd ==> isn't that just one page, i.e., page 2?
4th - 4th ==> isn't that just one page, i.e., page 4?
3rd - 44th page on the left and 3rd page on the right ==> how can the 3rd page be on the left and right?

Regards, Joe
CompTIA Security+

Learn the essential functions of CompTIA Security+, which establishes the core knowledge required of any cybersecurity role and leads professionals into intermediate-level cybersecurity jobs.

Software ProgrammerAuthor Commented:
it is A4 side...each page has two sides...i.e two pages.....We need to veritically cut the pages and re-order it again..Manual process is cumbersome..Need an automatic way as need to convert huge book pdfs.
Joe Winograd, Fellow&MVEDeveloperCommented:
I am having Adobe Acrobat DC.
Standard or Pro?
it is A4 side
Do you mean "A4 size"?
We need to vertically cut the pages and re-order it again
I think you're confirming my previous post, but I'm not sure. I think you're saying that it is an A3 page in landscape mode, with the left side and right side each containing an A4 page in portrait mode, like this:

A3 landscape with two A4 portrait
I think you want to split the A3 page vertically in the middle to create two A4 pages. Is that right? Regards, Joe
Software ProgrammerAuthor Commented:
Exactly..Vertically splitting is easy..However re-ordering will take time. Need a automatic way to re-order correctly. Automatica Page number recogniztion also is not possible with Adobe Acrobat.
Joe Winograd, Fellow&MVEDeveloperCommented:
Need a automatic way to re-order correctly.
I finally figured out these four lines from your initial post:

1st - 46th page on the left & 1st page on the right
2nd - 2nd page on the left and 45th page on the right
3rd - 44th page on the left and 3rd page on the right
4th - 4th page on the left and 43rd page on the right

The confusing part is that I originally thought that "1st - 46th" went together. But now I realize that the numbers in the first three characters of each line refer to the A3 page number, while the two numbers later in the line refer to the A4 page numbers. In other words, here's a different way to phrase those four lines that I think explains it better:

A3 (landscape) page 1 contains A4 (portrait) page 46 on the left and A4 (portrait) page 1 on the right
A3 (landscape) page 2 contains A4 (portrait) page 2 on the left and A4 (portrait) page 45 on the right
A3 (landscape) page 3 contains A4 (portrait) page 44 on the left and A4 (portrait) page 3 on the right
A3 (landscape) page 4 contains A4 (portrait) page 4 on the left and A4 (portrait) page 43 on the right

This, of course, is what happens when you scan a book, i.e., both pages are open, on the left and right, and the scanner captures both pages in a single scan, creating only one page in the PDF. Some book scanners have software that can do the split automatically at scanning time, thereby creating two portrait pages in the PDF file. One example of this is the xcanex bookscanner and its PerfeCapture software, which has a Dual-Page mode:

xcanex perfecapture3 book dual-page mode
You can see in the thumbnail panel on the left that it creates two individual portrait pages from each dual-page landscape scan. Of course, you're here at EE because you have book scans that weren't split at scanning time. So, back to your issue. If the order of the A3 pages is always the same, then the order of the A4 pages split from the A3 pages is straightforward. I'm not a JavaScript expert, but I'm sure that it can be done with a script along the lines of this thread at the Adobe forums:

I would do it with a script written in AutoHotkey that calls the PDFtk Server command line to perform the page ordering, but with an EE username of "Software Programmer", I'm sure that you have a go-to language of choice for projects like this. :)

Btw, you said that "Vertically splitting is easy", but for other EE members who find this thread and are not aware of how to do the splitting, this article by Karl Heinz Kremer will help:
Page Splitter Redux

I wrote a program (in AutoHotkey) to do this that calls the Xpdf utility PDFtoPNG to convert each A3 PDF page to a PNG, then splits the PNG into two portrait A4 pages, then calls ImageMagick (could also use GraphicsMagick) to convert from PNG to PDF. This is valuable for folks who do not have Acrobat.

Regards, Joe

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Software ProgrammerAuthor Commented:
The above process seems to be cumbersome. I tried the following and it worked. please let me know whether we can simplify this process.....This has 4 stages which i have designed by myself to solve the issue..This is applicable for the above use case only

1. Vertically cut the PDF using A Page Cut Software (or using splitpages.js) or any open source PDF software or online
2. Split the PDF pages into individual files using SAM PDF software which is open source
3. Remember the number of pages in the PDF file and need to give the number of pages in the below program in the total pages variable. by default it would be 32. Run the below program by giving proper folder name as well as the total number of pages so that all the pages will be arranged in a sequential order
4. Merge all the sequential PDF files using SAM PDF software into a single file which is also open source.


public class ReorderPdf {

    public static void main(String args[]) {

        String fileNameStartsWith = "_PDFsam_Test-10";
        String dir = "C:\\Individual Pages\\src\\";
        String destDir = "C:\\Individual Pages\\dest\\";
        int totalPages = 32;
        int loops = totalPages/2;
        boolean pickFirst = true;
        int pageNbr1 = 0;
        int pageNbr2 = 0;
        int count = 1;
        for(int i=1; i <= loops; i++) {
            if(pickFirst == true) {
                pageNbr1 = totalPages;
                pageNbr2 = i;
                pickFirst = false;

            } else {
                pageNbr1 = i;
                pageNbr2 = totalPages;
                pickFirst = true;
            System.out.println("PageNbr 1 "+pageNbr1);
            System.out.println("PageNbr 2 "+pageNbr2);
            File dest = new File(destDir);
            File file1 = new File(dir + pageNbr1+fileNameStartsWith+".pdf");
            renameFile(file1, dir, count, fileNameStartsWith, destDir, pageNbr1);
            File file2 = new File(dir + pageNbr2+fileNameStartsWith+".pdf");
            renameFile(file2, dir, count, fileNameStartsWith, destDir, pageNbr2);



    public static void renameFile(File file, String dir, int count, String fileNameStartsWith, String destDir, int pageNbr) {
        boolean success = new File(dir + count+fileNameStartsWith+".pdf").renameTo(new File(destDir + pageNbr+fileNameStartsWith+"modified"+".pdf"));
        System.out.println("success2 : "+success);


please let me know whether we can simplify this process.....
Joe Winograd, Fellow&MVEDeveloperCommented:
Based on the original question, #a42537658 is an answer and worthy of points. However, later in the thread, the asker clarified that a "Manual process is cumbersome" (that's what #a42537658 is) and that he wants "an automatic way as need to convert huge book pdfs". The automatic way is described in #a42540682, with several solutions offered. Splitting the points evenly between the two experts.
Joe Winograd, Fellow&MVEDeveloperCommented:
please let me know whether we can simplify this process
Sorry, can't help you with that code...not a language I know.
Software ProgrammerAuthor Commented:
Can you please forward to PDF and java expert for their views?
Joe Winograd, Fellow&MVEDeveloperCommented:
I think that the best way for you to proceed is to ask a new question with the relevant Topics, probably Adobe Acrobat, Java, JavaScript, and PDF. When you include the code in the question, wrap it in the BBCode code tags by either using the formatting toolbar (called the BTF here at EE) or typing in the BBCodes manually ([code] and [/code]). This makes the code more readable and easy to select-copy-paste. Good luck with the new question! Regards, Joe
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Acrobat

From novice to tech pro — start learning today.