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

Multi-page document splitting (feature request) #758

Closed
petaflot opened this issue Nov 19, 2022 · 6 comments
Closed

Multi-page document splitting (feature request) #758

petaflot opened this issue Nov 19, 2022 · 6 comments
Assignees
Milestone

Comments

@petaflot
Copy link

Describe the bug

PDFArranger is great to merge files ; to split them, no so.

To Reproduce

Go to a print shop with a pile of papers, ask them to scan it. They will either scan individual pages into a PDF file each (more expensive), or give you a PDF file containing all the pages.

It is likely that there will be multiple documents possibly unrelated to each other, some of which may be multiple pages.

Expected behavior

A helper to split a document into sub-documents ; it should insert a clearly visible separator between two pages, possibly allowing the user the specify a filename for the sub-document.

There should be a way to specify file naming format with values such as auto-increment index, start-stop page number, original file name, current date..

Once the user is happy with the way the document is split (possibly inserting pages from another source), a button to save everything should... save everything.

Input files

any multi-page document

Screenshots

pdfa_split

System and Versions

All

@kbengs
Copy link
Member

kbengs commented Nov 20, 2022

Have you tried to have two (or more) pdfarrranger windows open? You could drag the pages you want to have in one document to the other instance, then save them, then close (ctrl+W) and continue with next document.

Adding markers as you suggest is not possible in iconview. The feature would need to be implemented in gtk iconview first.

@petaflot
Copy link
Author

petaflot commented Nov 20, 2022

I have considered it, but:

  • just thinking about it my mouse wrist already hurts. I personally have severe back and misc joint issues which make it unrealistic ; I know I'm not the only one and sparing such pains to those who don't have it already would be nice
  • I feel like crying when I think of the the effort needed to manually type in file names while making sure I don't overwrite anything, don't leave blank indexes (not an issue in my case, but for others?), don't forget a page here and there..

Instead of markers as suggested above, how about inserting dummy pages that act as markers?

pdfa_x

Considering this, I guess it would make sense to have a workflow such as

  • select a number of pages
  • select "make this selection a document" (a keyboard shortcut would definitely help)

Using a "random" color to mark sub-documents would be very nice, too, I suppose no too hard to implement in gtk iconview (unless it's already a feature, which would surprise me)

Another appreciated feature would be "preview (sub-)document" ; this goes with something that's been in my mind for a while : sometimes the thumbnails are not large enough to really know which page is which, a "view this page fullsize" feature could help there.

@kbengs
Copy link
Member

kbengs commented Nov 20, 2022

This is a bit interesting idea. But I am not convinced this feature would make the export workflow easier. Automatic document naming is one thing, but I guess many would not be happy with the names and rename them later anyway.

select "make this selection a document" (a keyboard shortcut would definitely help)

ctrl + e and then type a name. After that you could delete the pages so you know they are done.

view this page fullsize

double-click or f. You might need 1.9.1 for this, don't remember.

@petaflot
Copy link
Author

petaflot commented Nov 20, 2022

double-click or f. You might need 1.9.1 for this, don't remember.

oh nice. seems so obvious :-/ how did I miss that

Automatic document naming is one thing, but I guess many would not be happy with the names and rename them later anyway.

that's why many programs support variables in file naming (grip for instance, or simply strftime)

exporting a selection would do, I like the idea. ideally, there are as few keystrokes / mouse clicks involved as possible:

click first page, press+hold shift key, click last page, release shift key, ctrl+e, enter (to confirm the name), delete1 key. that's it. the save dialog - allows specifying the filename - can do auto-increment (like xsane does).

Footnotes

  1. after export, the selection must be kept. makes workflow faster, helps not having duplicate pages and the like. or have a checkbox in the export dialog that is labelled sth like "delete exported pages from set"

@kbengs
Copy link
Member

kbengs commented Nov 21, 2022

A index, which counts up for every export, which is added to the suggested filename when exporting would make sense imo.

For example:
pikepdf-001.pdf (on first export)
pikepdf-002.pdf (on second export)

That should improve the multi-export workflow. I suggest we do that small change and close this issue with that.

#723 might also ad a useful feature for you @petaflot

@petaflot
Copy link
Author

A index, which counts up for every export, which is added to the suggested filename when exporting would make sense imo.

great! the sooner the better ;-)

as far I was able to guess, xsane does the increment thingy only if the last chars of the filename are an integer. pretty straightforward, not very versatile but it works and it's simple enough.

#723 makes little sense to me.. as stated in one comment, this is very easily achieved with a little bit of scripting. graphical apps are best when anything.. graphical is needed.

@kbengs kbengs self-assigned this Nov 22, 2022
kbengs added a commit to kbengs/pdfarranger that referenced this issue Nov 22, 2022
"first_imported_file-0001.pdf" instead of suggesting overwriting
"first_imported_file.pdf". Count up one on every export.

Close pdfarranger#758
kbengs added a commit to kbengs/pdfarranger that referenced this issue Nov 22, 2022
"first_imported_file-0001.pdf" instead of suggesting overwriting
"first_imported_file.pdf". Count up one on every export.

Close pdfarranger#758
kbengs added a commit to kbengs/pdfarranger that referenced this issue Nov 22, 2022
"first_imported_file-0001.pdf" instead of suggesting overwriting
"first_imported_file.pdf". Count up one on every export.

Close pdfarranger#758
kbengs added a commit to kbengs/pdfarranger that referenced this issue Dec 3, 2022
"first_imported_file-0001.pdf" instead of suggesting overwriting
"first_imported_file.pdf". Count up one on every export.
Close pdfarranger#758
kbengs added a commit to kbengs/pdfarranger that referenced this issue Dec 5, 2022
"first_imported_file-01.pdf" instead of suggesting overwriting
"first_imported_file.pdf". Count up one on every export.
Close pdfarranger#758
petaflot pushed a commit to petaflot/pdfarranger that referenced this issue Dec 9, 2022
"first_imported_file-01.pdf" instead of suggesting overwriting
"first_imported_file.pdf". Count up one on every export.
Close pdfarranger#758
@jeromerobert jeromerobert added this to the 1.10 milestone Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants