You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `pdf:split` command divides a single PDF into individual pages, with each page becoming a separate PDF file.
105
+
The `pdf:split` command divides a single PDF into individual pages, with each page becoming a separate PDF file. You can optionally limit which pages are extracted and combine them into a single output PDF.
106
106
107
107
### Basic Splitting
108
108
@@ -139,6 +139,51 @@ Creates files named:
139
139
-`chapter_page_2.pdf`
140
140
- etc.
141
141
142
+
### Extracting a Page Range
143
+
144
+
Use `--pages` to limit which pages are extracted (1-based indexing):
145
+
146
+
**Single page:**
147
+
```bash
148
+
parxy pdf:split document.pdf --pages 3
149
+
```
150
+
151
+
**Page range:**
152
+
```bash
153
+
parxy pdf:split document.pdf --pages 2:5
154
+
```
155
+
156
+
**From start to page N:**
157
+
```bash
158
+
parxy pdf:split document.pdf --pages :5
159
+
```
160
+
161
+
**From page N to end:**
162
+
```bash
163
+
parxy pdf:split document.pdf --pages 3:
164
+
```
165
+
166
+
### Combining Pages into a Single PDF
167
+
168
+
Use `--combine` to extract a page range into a single output PDF instead of one file per page:
-`--output, -o`: Without `--combine`: output directory (default: `{filename}_split/`). With `--combine`: output file path (default: `{filename}_pages_{from}-{to}.pdf` next to the input).
This produces `pymupdf-document.md` and `llamaparse-document.md`.
220
220
221
+
### Converting Pre-parsed JSON Results
222
+
223
+
If you have a JSON file produced by `parxy parse -m json`, you can convert it to Markdown directly without re-parsing:
224
+
225
+
```bash
226
+
parxy markdown result.json
227
+
```
228
+
229
+
This loads the `Document` model from the JSON and converts it immediately — no driver or API call required. You can mix JSON files and PDF files in the same invocation:
0 commit comments