Bytefusedocs

Pages

Reorder Pages

Rearrange a PDF into a new page sequence. You provide the complete new order — every page exactly once — and the reordered PDF is streamed back.

Free to try — no key required 10 credits / callSynchronous

Overview

On the free-try path. Page numbers are 1-based.

POSThttps://api.bytefuse.in/api/v1/pdf/pages/reorder

Request

Content type multipart/form-data:

filefilerequired
The source PDF.
orderstringrequired
The complete new order as comma-separated 1-based page numbers — every page listed exactly once, e.g. "3,1,2". A bad token returns 400.

Extract vs reorder

To keep only a subset (and drop the rest), use Extract Pages. Use Reorder when you want to keep every page but change its position.

Response

The file is returned directly

Unlike the URL-returning tools, page operations stream the edited PDF back as the response body — application/pdf with Content-Disposition: attachment. Read the raw bytes and save them; there is no JSON envelope. The X-Credits-Charged header reports the credits billed (0 for anonymous calls).

Examples

curl -X POST https://api.bytefuse.in/api/v1/pdf/pages/reorder \
  -F "file=@slides.pdf" \
  -F "order=3,1,2" \
  -o reordered.pdf

Errors

400A malformed order list, or one that doesn’t list every page exactly once.
402 / 429 / 503Insufficient credits, rate limited, or capacity/config error.
500The operation failed unexpectedly.