|
1 | 1 | # PDF Joiner |
2 | 2 |
|
3 | | -A simple command-line utility for joining multiple PDF files into a single PDF document on macOS. |
| 3 | +[](https://github.com/vinitkumar/pdf-joiner/actions/workflows/ci.yml) |
| 4 | + |
| 5 | +A simple command-line tool to join multiple PDF files into a single PDF document on macOS. |
4 | 6 |
|
5 | 7 | ## Requirements |
6 | 8 |
|
7 | | -- macOS (This tool uses the built-in macOS PDF joining utility) |
8 | | -- Go 1.18 or later (for building from source) |
| 9 | +- macOS (the tool uses the built-in macOS PDF joining utility) |
| 10 | +- Go 1.24 or higher (for development) |
9 | 11 |
|
10 | 12 | ## Installation |
11 | 13 |
|
12 | 14 | ### From Source |
13 | 15 |
|
14 | | -1. Clone this repository: |
15 | | - ``` |
16 | | - git clone https://github.com/vinitkumar/pdf-joiner.git |
17 | | - cd pdf-joiner |
18 | | - ``` |
19 | | - |
20 | | -2. Build the binary: |
21 | | - ``` |
22 | | - make build |
23 | | - ``` |
24 | | - |
25 | | -3. (Optional) Install the binary to your system: |
26 | | - ``` |
27 | | - make install |
28 | | - ``` |
29 | | - |
30 | | -## Usage |
31 | | - |
| 16 | +```bash |
| 17 | +git clone https://github.com/vinitkumar/pdf-joiner.git |
| 18 | +cd pdf-joiner |
| 19 | +go build -o pdf-joiner |
32 | 20 | ``` |
33 | | -pdf-joiner [-o output.pdf] file1.pdf file2.pdf [file3.pdf ...] |
34 | | -``` |
35 | | - |
36 | | -### Options |
37 | 21 |
|
38 | | -- `-o`: Specify the output file path. If not provided, the output will be saved as `joined-pdf-YYYY-MM-DD-HHMMSS.pdf` in the current directory. |
| 22 | +### From Releases |
39 | 23 |
|
40 | | -### Examples |
| 24 | +Download the latest binary from the [Releases page](https://github.com/vinitkumar/pdf-joiner/releases). |
41 | 25 |
|
42 | | -Join two PDF files: |
43 | | -``` |
44 | | -pdf-joiner file1.pdf file2.pdf |
45 | | -``` |
| 26 | +## Usage |
46 | 27 |
|
47 | | -Join multiple PDF files with a specific output path: |
48 | | -``` |
49 | | -pdf-joiner -o merged.pdf file1.pdf file2.pdf file3.pdf |
50 | | -``` |
| 28 | +```bash |
| 29 | +# Join PDFs with default output filename (timestamp-based) |
| 30 | +./pdf-joiner file1.pdf file2.pdf file3.pdf |
51 | 31 |
|
52 | | -Join all PDF files in a directory: |
53 | | -``` |
54 | | -pdf-joiner -o merged.pdf /path/to/directory/*.pdf |
| 32 | +# Join PDFs with a custom output filename |
| 33 | +./pdf-joiner -o output.pdf file1.pdf file2.pdf file3.pdf |
55 | 34 | ``` |
56 | 35 |
|
57 | | -## How It Works |
| 36 | +## Features |
58 | 37 |
|
59 | | -This tool is a wrapper around the macOS built-in PDF joining utility located at: |
60 | | -``` |
61 | | -/System/Library/Automator/Combine PDF Pages.action/Contents/MacOS/join |
62 | | -``` |
| 38 | +- Join multiple PDF files into a single document |
| 39 | +- Specify custom output path |
| 40 | +- Automatic output filename generation with timestamp |
| 41 | +- Verification of input files |
63 | 42 |
|
64 | 43 | ## Development |
65 | 44 |
|
66 | | -### Running Tests |
| 45 | +### Testing |
67 | 46 |
|
68 | | -``` |
69 | | -make test |
| 47 | +```bash |
| 48 | +go test -v ./... |
70 | 49 | ``` |
71 | 50 |
|
72 | | -### Building for Different Architectures |
| 51 | +### Building |
73 | 52 |
|
74 | | -Build for both Intel and Apple Silicon Macs: |
75 | | -``` |
76 | | -make build-universal-darwin |
77 | | -``` |
78 | | - |
79 | | -### Cleaning Up |
80 | | - |
81 | | -``` |
82 | | -make clean |
| 53 | +```bash |
| 54 | +go build -o pdf-joiner |
83 | 55 | ``` |
84 | 56 |
|
85 | 57 | ## License |
86 | 58 |
|
87 | | -MIT. See the `LICENSE` file for more details. |
| 59 | +MIT |
88 | 60 |
|
89 | 61 | ## Author |
90 | 62 |
|
|
0 commit comments