Allow for a single file merge?

Open Beginner friendly
#1 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
75/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
visualbasic
Domain
desktop

Research direction

Start at the MergedPdfs routine and inspect the UBound(tFilesIn) validation shown in the issue. Verify the behavior for zero, one, and multiple selected files, including parsing a single file for page-range splitting. Done means an empty selection is still rejected while one selected file is accepted.

Written by the indexing model from the issue text.

Description

I think only one small change is needed in MergedPdfs:

        If UBound(tFilesIn) = 0 Then
            AppendLog "Error: One or more files must be selected to merge."
            Return E_INVALIDARG
        End If

To:

        If UBound(tFilesIn) < 0 Then
            AppendLog "Error: One or more files must be selected to merge."
            Return E_INVALIDARG
        End If

That change seems consistent with the logged error within the block, and in limited testing seems to work for me. This would allow user to parse a single file which I've had several use cases for like split a large pdf into several smaller ones based on page ranges.

Thanks - very useful demo.

Dominant language
Visual Basic 6.0
Stars
8
Forks
3
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More Desktop Dev issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.