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

feature_request(merge): numerical (intuitive) order #364

Closed
Kristinita opened this issue Aug 14, 2019 · 4 comments
Closed

feature_request(merge): numerical (intuitive) order #364

Kristinita opened this issue Aug 14, 2019 · 4 comments

Comments

@Kristinita
Copy link

#326 — related issue

1. Summary

It would be nice, if Sejda for Windows will support intuitive (numerical) order, not lexicography order solely.

2. Argumentation

Why I need numerical order. I scan the book → I process books images → I convert images to PDF files → I need merge these files to PDF.

My PDF files have names 1.pdf, 2.pdf, 3.pdf and so on. I need the same order in merged PDF.

Also, it would be nice, if I merge PDF's quickly, use minimum actions. Therefore, for books, that contains hundreds of pages, I will use methods from item 7 of this issue, not manually set Sejda Console or PDFSam.

3. Data

For example, I have files 4.pdf, 7.pdf and 14.pdf. Example files here, but you can use any another .pdf files with this names.

4. Steps to reproduce

I download and unzip latest Sejda Console Windows binary for 14.8.2019 → I add path of Sejda bin folder to my PATH environment variable → I run sejda-console command:

sejda-console merge -f *.pdf -o KiraSuperhero.pdf

5. Actual behavior

Lexicographic (or classic literal filename) sorting:

For KiraSuperhero.pdf:

  • page 1 — 14.pdf,
  • page 2 — 44.pdf,
  • page 3 — 7.pdf.

For PDFtk I have the same behavior.

5.1. Sejda Console

D:\SashaDebugging\SejdaOrder>sejda-console merge -f *.pdf -o KiraSuperhero.pdf
Configuring Sejda 3.2.83
Document root element "sejda", must match DOCTYPE root "null".
Document is invalid: no grammar found.
Starting execution with arguments: 'merge -f 14.pdf 44.pdf 7.pdf -o KiraSuperhero.pdf'
Java version: '1.8.0_211'
Validating parameters.
Starting task (org.sejda.impl.sambox.MergeTask@22ff4249) execution.
Temporary output set to D:\SashaDebugging\SejdaOrder\.sejdaTmp3576627231588078914.tmp
Opening D:\SashaDebugging\SejdaOrder\14.pdf
Adding pages
Updating outline with policy RETAIN
Filtering annotations
Skipped acroform merge, nothing to merge
Task progress: 33% done
Opening D:\SashaDebugging\SejdaOrder\44.pdf
Adding pages
Updating outline with policy RETAIN
Filtering annotations
Skipped acroform merge, nothing to merge
Task progress: 67% done
Opening D:\SashaDebugging\SejdaOrder\7.pdf
Adding pages
Updating outline with policy RETAIN
Filtering annotations
Skipped acroform merge, nothing to merge
Task progress: 100% done
Moving D:\SashaDebugging\SejdaOrder\.sejdaTmp3576627231588078914.tmp to D:\SashaDebugging\SejdaOrder\KiraSuperhero.pdf.
Input documents merged correctly and written to org.sejda.model.output.FileTaskOutput@dd8ba08[D:\SashaDebugging\SejdaOrder\KiraSuperhero.pdf]
Task (org.sejda.impl.sambox.MergeTask@22ff4249) executed in 0 seconds
Completed execution

6. PDFSam Basic

Same:

PDFSam

7. Expected behavior

Numerical sorting.

For KiraSuperhero.pdf:

  • page 1 — 7.pdf,
  • page 2 — 14.pdf,
  • page 3 — 44.pdf.

7.1. sejda.com

I visit https://www.sejda.com/merge-pdf → I upload my 3 example files → ReorderFile names, A—Z:

sejda.com order

Merge PDF files → I get PDF with expected behavior.

7.2. Weeny Free PDF Merger

I have expected behavior, if I merge my PDF, use this program. It's Windows program, but support numerical order.

7.3. Bulk Rename Utility

Bulk Rename Utility have an option Logical Sorting for solving this problem. Compare files order, if option:

  • disabled:

BRU disabled

  • enabled:

BRU enabled

8. Not helped

8.1. Windows settings

I read about numerical sorting in Windows 10 File Explorer:

  1. I check, that numerical sorting not disabled in my «Local Group Policy Editor»
  2. I merge Enable_numerical_sorting_in_File_Explorer.reg

→ I restart Windows → I make «Steps to Reproduce» → I have the same behavior.

8.2. Options

I can't find options, how I can change order to numerical in:

  • sejda-console merge -h
  • PDFSam settings

9. Environment

  • Windows 10 Enterprise LTSB 64-bit EN
  • Java 1.8.0_211
  • Sejda Console 3.2.83
  • PDFSam 4.0.3

Thanks.

@wayward-turnip
Copy link

Good suggestion.

@torakiki
Copy link
Owner

torakiki commented Sep 7, 2020

This is fixed in PDFsam and in Sejda using the -d argument to merge all the PDFs in a directory (which should pretty much do the same as the .pdf).
Added now to also be consistent when using -f and wildcards (
.pdf)

@torakiki torakiki closed this as completed Sep 7, 2020
@Kristinita
Copy link
Author

@torakiki, did I understand correctly that version 3.2.85 was the latest free version of sejda-console?

Thanks.

@torakiki
Copy link
Owner

torakiki commented Oct 1, 2020

Yes, 3.x was the last free open source version of the sejda-console that we released

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