Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rearrange pages (as recto/verso scanned) #526

Open
camlafit opened this issue Sep 6, 2021 · 13 comments
Open

Rearrange pages (as recto/verso scanned) #526

camlafit opened this issue Sep 6, 2021 · 13 comments
Labels
feature Request for a new feature

Comments

@camlafit
Copy link

camlafit commented Sep 6, 2021

Hello

It's a feature request not a bug. Idea is took from simple scan we can rearrange document after have been scanned many pages.

Capture d’écran de 2021-09-06 16-21-08

Could be nice to provide a similar feature.

Thanks a lot

@dreua
Copy link
Member

dreua commented Sep 6, 2021

I think all 4 cases are already possible by combining the "Reverse order" function and the cut and "Paste interleave" functions. A dialog like this would be easier / better UX in some cases, though.

@camlafit
Copy link
Author

camlafit commented Sep 6, 2021

Hello

I've tried to use cut and paste interleave (odd/oven) but was not easy to be sure to do correct steps (file has about 200 pages to arrange).
Then finally as workaround I've split file (odd and even part) and use pdftk and its shuffle feature to export final file. It's a bit tricky and not user friendly :)

In our case I think only about two firsts case. Third option is yet present and last option 'stay unchanged' is not useful, I've any idea why this option is proposed.

Thanks a lot

@angsch
Copy link
Member

angsch commented Sep 6, 2021

I am curious about the top right case. Where does such an ordering occur?

@pdfarranger Shall we use this as an opportunity to rename "paste interleave odd/even" into "paste as odd/even pages"? We discussed this at some point and noticed that some translations already use this wording.

@dreua
Copy link
Member

dreua commented Sep 6, 2021

@angsch The top right case is actually quite common if you scan a batch of double sided pages with a non-duplex scanner: Scan the fronts, flip the whole stack and scan the backs. (The last page will be scanned first.) It sounds wrong but absolutely makes sense if you did it once 😉

rename "paste interleave odd/even" into "paste as odd/even pages"?

Sounds good to me 👍

I'm not sure I or someone else on the team will find the time to work on this but I'd be in favor of having such a dialog as replacement for the "Reverse Order" function. (Should be renamed, obviously. Maybe just "Reorder" ?) Simple Scan is also under GPL3, we could possibly borrow code / designs / graphics.

@mara004

This comment has been minimized.

@camlafit

This comment has been minimized.

@kbengs

This comment has been minimized.

@mara004

This comment has been minimized.

@camlafit

This comment has been minimized.

@dreua dreua changed the title Re arrange pages (as recto/verso scanned) Rearrange pages (as recto/verso scanned) Jan 9, 2022
@dreua dreua added the feature Request for a new feature label Jan 9, 2022
@stefan123t
Copy link

stefan123t commented Apr 11, 2024

@angsch The top right case is actually quite common if you scan a batch of double sided pages with a non-duplex scanner: Scan the fronts, flip the whole stack and scan the backs. (The last page will be scanned first.) It sounds wrong but absolutely makes sense if you did it once 😉

simple-scan english Reorder pages dialog

I did just that in pdfarranger 1.8.2 which may serve as a workaround for the most common task to Combine sides (reverse):

  • Scan a whole stack of in my case 13 paper leaves = 26 pages, ie.
    1. first 13 odd front pages 1..25
    2. then (from the back to the beginning) all 13 even back pages 26..2.
  • When in pdfarranger load the whole scan
  1. Then select the second half, i.e. scans 14-26.
  2. Then right click to Reverse Order for the even pages scanned in the descending order.
  3. Then cut the second half correctly ordered even pages using right click Cut or Ctrl+X
  4. Then use right click in the grey area behind the last page Paste Special > Paste as Even Pages
  • Finally use Save As... to store the correctly ordered scan of your pages.

Implementing a similar Reorder Pages dialog as in Document Scanner / simple-scan would allow to execute steps 1. through 4. using one button Combine sides (reverse) 😉

This would somehow solve similar problems, where opening a PDF document in simple-scan for the very same purpose(s) is not possible due to their internal image / page format not being native PDF.

https://gitlab.gnome.org/GNOME/simple-scan/-/issues/27 Allow opening an existing PDF
and
https://gitlab.gnome.org/GNOME/simple-scan/-/issues/320 simple-scan not able reconnect scanner after awakening scanner from sleep or disconnecting scanner due to connection failure

@stefan123t
Copy link

stefan123t commented Apr 11, 2024

I had a quick peak into the simple-scan source code.
The implementation installed under Linux Mint 21.3 is simple-scan version 42.0 from 2018 :sigh:
hence I could only screenshot the four button reorder page modes above.

The layout of the buttons in the dialog has been changed about a year ago with this commit:
Replace page reordering dialog with new design

Please note there were already six reorder page buttons before the commit, two additional for rotating/flipping even/odd pages:

  • Combine sides
  • Combine sides (reverse)
  • Reverse
  • Keep unchanged / aka. Cancel
  • Flip even pages upside-down
  • Flip odd pages upside-down

I think the two options for flipping even/odd pages could also be worked around quite intuitively using something like the existing Select > Select odd pages / Select even pages and then using Rotate left or Rotate right twice on them.
The Cancel Button has no images / picture anymore and may have disappeared with the commit.

Whereas the above request to rearrange / interleave pages as described above is not quite so straight forward.
A new "re-shuffle all front sides + rear sides scanned document" as in Combine sides (reverse) / Interleave (reverse) would be much appreciated.

Interesting were the two files src/app-window.vala and src/page-icon.vala which have been used to create the button graphics "on the fly" programmatically in Gtk based on four types of pages and numbers from 1..3/4..6:

  • F front side page #c061cb purple 2
  • B back side page #ff7800 orange 3
  • U flip upside-down page #5cc02e green 4
  • R rightside-up page #0deee7 blue 4
  • C or default is from start #f6d32d Yellow 3 to end #ed333b Red 2
  • - for the arrow
    using these six button templates for the code:
        /* Label on button for combining sides in reordering dialog */
        var b = make_reorder_button (_("Combine sides"), "F1F2F3B1B2B3-F1B1F2B2F3B3");
...
        /* Label on button for combining sides in reverse order in reordering dialog */
        b = make_reorder_button (_("Combine sides (reverse)"), "F1F2F3B3B2B1-F1B1F2B2F3B3");
...
        /* Label on button for reversing in reordering dialog */
        b = make_reorder_button (_("Reverse"), "C1C2C3C4C5C6-C6C5C4C3C2C1");
...
        /* Label on button for cancelling page reordering dialog */
        b = make_reorder_button (_("Keep unchanged"), "C1C2C3C4C5C6-C1C2C3C4C5C6");
...
        /* Label on button for keeping the ordering, but flip every second upside down */
        b = make_reorder_button (_("Flip even pages upside-down"), "R1U2R3U4R5U6-R1R2R3R4R5R6");
...
        /* Label on button for keeping the ordering, but flip every second upside down */
        b = make_reorder_button (_("Flip odd pages upside-down"), "U1R2U3R4U5R6-R1R2R3R4R5R6");

This has since been replaced by several fixed SVG icons with the above commit #37caec48.

action / order mode before after
Combine sides image
interleave-before.svg
image
interleave-after.svg
Combine sides (reverse) image
interleave-before.svg
image
interleave-reverse-after.svg
Flip odd pages upside-down image
flip-before.svg
image
flip-odd.svg
Flip even pages upside-down image
flip-before.svg
image
flip-even.svg
Reverse image
reverse-before.svg
image
reverse-after.svg

@camlafit
Copy link
Author

Hello

Thanks to take in consideration this old issue :)

Note : on stable debian 12, simple scan provide again "old" interface. It's 42.5 version.

@stefan123t
Copy link

simple-scan has a book class which binds all the pages and allows to change the page order using:

besides the basic CRUD:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Request for a new feature
Projects
None yet
Development

No branches or pull requests

6 participants