Repository navigation
Ask every time for the pages of Split PDF (#981) - #1102
Merged
Merged
Conversation
A PDF dropped on a preset whose pages are set to "Ask every time" opens a small "Choose pages" window: it shows the page count, checks the range as it is typed (13-55, 1-3, 8, 12-15, 100-) and, for a PDF target, offers one PDF or one file per page. Enter starts it, Esc starts nothing. Several PDFs get a window each, so each can give its own chapter. - PdfOptions.AskPageRange, off by default: no settings migration. On for Split PDF in a new install only. - Preset editor: "Ask every time" under Pages (not for a merge). - PageRange.Check for ranges typed by hand, including other digits, dashes and commas other keyboards type. - filee convert --pages <range> overrides the preset's range. - Strings in all 20 languages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
KnifeLemon
added a commit
to arielsrossi/Filee
that referenced
this pull request
Nov 4, 2026
…bs too Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
8 of 9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it does
"Ask every time" for the pages of a PDF preset (#981). Drop a PDF on the slot and a small Choose pages window opens:
13-55,1-3, 8, 12-15,100-, or leave it empty for every page. It is checked as you type: "Pages chosen: 43 of 812", or in red "This PDF ends at page 812." / "Type page numbers from 1, like …", and the button stays off until the range is valid;The button carries the preset's name ("Split PDF"), like the merge window's.
Where it is turned on
BuiltInDatagetsAskPageRange = true, no migration). Existing libraries keep their Split PDF exactly as it is; users turn it on in the editor. Reset to defaults / a restored Split PDF get the new default.PdfOptions.AskPageRangeis an optional bool that defaults to off: an older library reads as off, an older Filee ignores it.Behaviour details (decisions worth a look)
{name}folder of pages: the run's copy gets "subfolder only when a file becomes several" (SubfolderOnlyForSeveralFiles), so it's saved next to the source.१-३, ५).CLI
filee convert … --pages <range>overrides the preset's range (e.g.filee convert book.pdf --preset pdf-split --pages 13-55). It's checked with the same rules (no page count there), and a wrong range is a usage error (exit 2). Listed infilee help convert. The CLI never asks. (filee.sh/cli lists options too; it isn't in this repo.)Screenshots
All checked shots:
13-55, "Pages chosen: 43 of 812", One PDF selected, Cancel / Split PDF.페이지 선택,고른 페이지: 43 / 812,PDF 하나로/페이지마다 파일 하나,취소/PDF 분할).800-830): the red "This PDF ends at page 812.", Split PDF greyed out (English dark, German light).How tested
AskedPagesTests(Core, new): ranges typed by hand (spans, open ends, reversed, duplicates, en dash, Devanagari / Arabic-Indic digits, full-width punctuation) give the text used and the page count, matching what the converters read; invalid input (abc,3-x,0,-,1-3-5,1.5,+3,1;3); pages past the end only when the count is known; which presets ask (not merges, groups, tools); one PDF / one file per page only for a PDF target (not N-up, not OCR); the answer goes into a copy that asks no more and leaves the saved preset alone; Split PDF asks in a new install while an existing library saved without the setting stays off after loading.AskPagesTests(App, new, headless):3-5, 9+ One PDF + Enter → one job, a PDF of exactly pages 3, 4, 5 and 9; Esc → no job, no file, preset unchanged; the One PDF choice is kept in the saved preset;13-55and15-23→ 43 and 9 pages;CliTests:--pages "2–3, 5"with Split PDF writesbook_p2/p3/p5.pdf;--to pdf --pages 4-extracts 3 of 6 pages;--pages 1-x→ exit 2.dotnet build Filee.slnx(no new warnings);dotnet format Filee.slnx --verify-no-changesclean.RenderTests.Engines_page_shows_versions_descriptions_and_download_speed, because Tesseract is installed under Program Files on the test machine (unrelated). After the rebase:AskPagesTests,LocalizationTests,LocalizationResourceTests,AutomationNameTests,MergeOrderTests,PresetEditorTargetTests284/284, Core again 1007/1007.UI strings in all 20 languages (incl. vi), in each language's existing terms for the donut, watch folders and the command line; Korean in 해요체.
Closes #981
🤖 Generated with Claude Code