Split document numbering

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
anotheracademic
User
Posts: 9
Joined: Mon Dec 06, 2010 8:16 pm

Split document numbering

Post by anotheracademic »

I have scanned a double sided document on a photocopier to a stick. Though the machine has a recto-verso document feeder, the scans on the verso are always worse. Therefore I scanned all the recto, then scanned all the verso, and this meant the scanning for the verso was in reverse page order.
Then I opened each file. Document/split document led to a very limited set of options. I saved the recto as many one page files. So far so good. What I want to do is to save the verso to a separate folder, and have the file names in reverse order.
Then I can use the free utility "Bulk rename utility" and simply rename the files incrementally for odd numbers, and do the same for verso, renumbering with even numbers.
Now the crunch point. The verso file starts at the end of the document. Therefore when I split it I need to be able to number them within xchange editor, in reverse order OR to rearrange the pages in the scanned document so that the last page becomes the first. Any ideas? Any setting? Any workaround?

The other problem is that the numbering of the split files does not make it easy to put them in numerical order later. Is there a setting so that page 1 is labelled page 01 ?
Willy Van Nuffel
User
Posts: 2392
Joined: Wed Jan 18, 2006 12:10 pm

Re: Split document numbering

Post by Willy Van Nuffel »

Hello,

I suppose the goal of your question about numbering is only to be able to merge the pages back in the right order or sequence ?
So, don't let us talk about numbering, but about a workaround.

I would suggest you to use the following information:

1) hyperlink to a topic with a javascript to reverse the page order in a PDF
viewtopic.php?f=62&t=28407&p=111667

2) hyperlink to a topic with a javascript to merge odd and even pages in a PDF
viewtopic.php?f=40&t=16264&p=122881

I hope this will help you out ...
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8588
Joined: Wed Jan 03, 2018 6:52 pm

Re: Split document numbering

Post by TrackerSupp-Daniel »

Hello anotheracademic,
Willy is correct here, using JS is the current only method of rearranging the pages. If you are looking for another solution, could you please simplify how you would like to see this work, and we can investigate other solutions.
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
anotheracademic
User
Posts: 9
Joined: Mon Dec 06, 2010 8:16 pm

Re: Split document numbering

Post by anotheracademic »

Thanks. I think I am going to try the script to re-order the pages. You will understand that unlike the first thread referred to, I have a sheet feeder. I feed in the recto. Then I feed in the verso, which is always in reverse page order.

(I could manually turn over each page, then feed in the verso, which would give the pages in ascending order. In the end, this might be the simplest solution for only a few books.)

Then I split each file in turn (to a separate directory) and renumber the files 1,3,5 etc for the recto, then 2, 4, 6, for the verso (using bulkrenamer). Merging is then easy within pdf tools.

OK. I am going to dream. JS asks how I would like to see it work.
1. Split document allows me to number in normal increasing order, or number in reverse order
2. Split document allows me to number as odd or even.
3. Option available to use 01 instead of 1 for filename numbers.
Then merging would be easy within pdf-tools.

Give me some time as I experiment with various workarounds.
anotheracademic
User
Posts: 9
Joined: Mon Dec 06, 2010 8:16 pm

Re: Split document numbering

Post by anotheracademic »

OK. First question about where to place the script. The suggested place was C:\Program Files\Tracker Software\PDF Editor\JavaScripts\ReversePageOrder.js and this folder does not exist.

When I searched for existing places for .js files, all I got was: c:\Program Files\Tracker Software\PDF-XChange Standard\
This is clearly not the place.
The subroot of PDF Editor\ only has the following folders:
\Dictonaries
\Help
\Languages
\Plugins.x86
\PluginsData
\Stamps
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm
Location: London, UK
Contact:

Re: Split document numbering

Post by Will - Tracker Supp »

Hi anotheracademic,

The folder does not normally exist by default, so you'll need to create it manually. Please note that the 'J' at the beginning should be capitalized: Javascipts.

Thanks,
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.

Best regards

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
anotheracademic
User
Posts: 9
Joined: Mon Dec 06, 2010 8:16 pm

Re: Split document numbering

Post by anotheracademic »

No problems making a folder and copying the .js script to it. Then I had to hunt around. I am using Version 7 with the ribbon turned off. I hunted I thought everywhere for the subfolder "addons". Was it under Edit, Document, or Tools? Eventually I noticed I had ticked to display an addons toolbar and noticed an unlabelled symbol (grrr) which when moused over told me it was "Reverse Order".

Where can I find Addons under the menu, for the times when I function with reduced numbers of toolbars?

Wow, it works! And works fast on an old computer! Now to split the document.
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm
Location: London, UK
Contact:

Re: Split document numbering

Post by Will - Tracker Supp »

Hi anotheracademic,

I've consulted with my colleagues and we're not quite sure we understand what you're referring to. Can you please send a screen-shot of what you're referring to, to clarify what is happening?

Thanks,
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.

Best regards

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
anotheracademic
User
Posts: 9
Joined: Mon Dec 06, 2010 8:16 pm

Re: Split document numbering

Post by anotheracademic »

Splitting the two documents, rector and verso, was easy, each to a separate folder. Then, I now provide details for the record, I used Bulk Rename Utility version 3.0 which is free for non commercial use.
1. In Display options\sorting\logical sorting needs a tick. This overcomes the xchange editor numbering problem.
2. Select the files.
3. On the right, there is a complicated box called Numbering
Mode = prefix
Start =1 this is page number start. set =1 for odd and =2 for even pages
Incr = .... set 2 provides alternate pages

The changes you are going to get appear in the files screen.

Then, bottom right, button, Rename.

Back to pdf-tools, import both folders, reorder the column a few times to get them interleafed and starting with page 1, and the job is done.

The really fiddly bit where it is easy to make mistakes when working on several sets of files, is the way you have to keep changing the settings within bulk-renaming utility. I think there might be memorised scripts within that program. Or, since it exists as a standalone, there is probably nothing to stop me running two copies, one for odd pages, the other for even pages.

Anyway, problem solved. Thanks/ This is going to save me a lot of time in the future.
anotheracademic
User
Posts: 9
Joined: Mon Dec 06, 2010 8:16 pm

Re: Split document numbering

Post by anotheracademic »

You say you do not know what I am referring to. I think you mean my reference to the menu?
The the editor comes with a menu on the top line, perhaps you call it something else.

Anyway, here is a screenshot as requested. Where would I find the addon in the menus if I wanted to use that method?
Attachments
0001.jpg
Willy Van Nuffel
User
Posts: 2392
Joined: Wed Jan 18, 2006 12:10 pm

Re: Split document numbering

Post by Willy Van Nuffel »

Good to read that your problem has been solved.

Just in case you would still be interested in a JavaScript solution:

I have made two JavaScripts
- ReversePageOrder.js
- MergeOddAndEven.js

These two files need to be placed in a subfolder of the PDF-XChange Editor installation. Something like:
C:\Program Files\Tracker Software\PDF Editor\JavaScripts

This will make that, when you start PDF-XChange Editor, there will be an additional toolbar with two 'puzzle' icons. One for each function.
This will be an answer on your toolbar question in your most recent post in this topic.

To test both javascripts I have made two sample PDFs:
- a first one, called "Odd pages.pdf" with the recto pages, in the following order 1, 3, 5, 7, 9
- a second one, called "Even pages.pdf" with the verso pages, in the following order 10, 8, 6, 4, 2

The "ReversePageOrder" JavaScript will be used to reorder the verso pages towards, 2, 4, 6, 8 ,10

After this, the two PDFs will have to be joined like this, 1, 3, 5, 7, 9, 2, 4, 6, 8, 10 (into one PDF)

The "MergeOddAndEven" JavaScript will be used to reorder these pages to a final 1, 2, 3, 4, 5, 6, 7, 8, 9, 10


All is included in the attached JoinPages.ZIP-file
Attachments
JoinPages.zip
(14.96 KiB) Downloaded 76 times
Last edited by Willy Van Nuffel on Fri Jun 08, 2018 12:28 pm, edited 1 time in total.
User avatar
Will - Tracker Supp
Site Admin
Posts: 6815
Joined: Mon Oct 15, 2012 9:21 pm
Location: London, UK
Contact:

Re: Split document numbering

Post by Will - Tracker Supp »

Thanks Willy!

Anotheracademic, as Willy said - glad to see you've solved the issue! Thanks for the screen-shot, I understand what you mean now and apologies for misunderstanding before: this menu does not exist in the latest release, even with the Classic UI and is only available in Version 6. However, it shouldn't be necessary for this task and all of the features of all of our add-ons are available under their own menu headings now (i.e. SharePoint, Bookmarks, etc.).

Cheers,
If posting files to this forum, you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded.
Thank you.

Best regards

Will Travaglini
Tracker Support (Europe)
Tracker Software Products Ltd.
http://www.tracker-software.com
anotheracademic
User
Posts: 9
Joined: Mon Dec 06, 2010 8:16 pm

Re: Split document numbering

Post by anotheracademic »

A week later. I have used the scripts extensively. They work every time, even on large files of over 100 pages.

I notice that problems happen most often due to the sheet feeder of the scanner. Pages are missed. Or, the first time through the scanner, the odd pages, often the feeder will interleaf the scanned page with the other scanned pages, so, before turning the book over and scanning the even pages, this has to be checked.

Deskew is surprisingly effective. Cropping to get rid of scanning marks works well, and unusual individual pages can easily be done separately. Then the pages can be resized back to A4. The only point where through experimentation I decided was negative, was the sharpening of the text. I found that sharpening a text resulted in fuzzy lower contrast text. Also, when I tried OCR this resulted in a huge increase in size, and I was expecting the opposite.

I am very pleased to find such a powerful set of utilities that work together. I am really amazed at the speed with which you wrote some add-ons for me, which worked first time. Thankyou.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17906
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Split document numbering

Post by Tracker Supp-Stefan »

Hello anotheracademic,

Thanks for the feedback once you've had the change to test all of the things offered above!
And kudos to everyone that helped especially Willy!

Cheers,
Stefan
User avatar
pinkfluffyphobia
User
Posts: 7
Joined: Sat Jan 23, 2021 5:27 pm

Re: Split document numbering

Post by pinkfluffyphobia »

Willy Van Nuffel wrote: Fri Jun 08, 2018 12:19 pm Good to read that your problem has been solved.

Just in case you would still be interested in a JavaScript solution:

I have made two JavaScripts
- ReversePageOrder.js
- MergeOddAndEven.js

Thank you very much for sharing your great script. It saved my day.
I wonder why Tracker isn't implementing this by default.
seriallnumber
User
Posts: 1
Joined: Mon Nov 28, 2022 8:27 am

Re: Split document numbering

Post by seriallnumber »

I am going to try the script to re-order the pages. You will understand that unlike the first thread referred to, I have a sheet feeder. I feed in the recto. Then I feed in the verso, which is always in reverse page order. https://teatv.ltd/
https://hellodear.in
Last edited by seriallnumber on Sat Dec 17, 2022 2:47 pm, edited 1 time in total.
User avatar
Dimitar - Tracker Supp
Site Admin
Posts: 1794
Joined: Mon Jan 15, 2018 9:01 am

Re: Split document numbering

Post by Dimitar - Tracker Supp »

Hello seriallnumber,

If the script does not do what you need, please send it to us and we will see what is wrong with it.


Regards.
Michael.A
User
Posts: 13
Joined: Thu Nov 21, 2013 10:47 am

Re: Split document numbering

Post by Michael.A »

I used this script very often. But after any update of PDF-XChange this script is no longer available. Even the "JavaScripts" directory has been deleted. I have reinstalled everything as described here, but PDF-XChange no longer displays the script in the interface. What should I do now?
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17906
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Split document numbering

Post by Tracker Supp-Stefan »

Hello Michael.A,

Do you use our own installer or a third party tool to do those updates?
As JS and custom stamps folders should persist when you do updates with our own updater. I've not heard such an issue with folders disappearing before.

Or do you maybe run some "clean up" tool between the uninstall and the reinstall of the new build?

Kind regards,
Stefan
Post Reply