Guide · Reading time: 4 min

Check PDF page order before you share a file

Printed page numbers versus positions in the file, and what a merged or extracted PDF leaves out.

Tierify · ·

Printed page numbers and positions in the file

The Pages to extract field in Extract PDF Pages counts positions in the file. The first page in the file is 1, whatever number is printed on it.

In a scanned report with a cover and three pages numbered i to iii, the page printed 1 is at position 5.

A PDF can also store page labels, such as i, ii, 1, 2, and some viewers show these labels in their page number box. Tierify ignores them. In a file labelled i, ii, 1, 2, entering 3 selects the page labelled 1. If you are not sure of a position, count the thumbnails in your viewer’s sidebar.

Examples of page entries

The new file follows the order you type, so you can also use Extract PDF Pages to reorder pages.

Results for a 4-page file, from the page selection code in Extract PDF Pages.
Pages to extractPages in the new file
2Page 2
2-4Pages 2, 3 and 4
3,1Page 3, then page 1
1-2,2Pages 1 and 2. The second 2 is ignored.
4-2Rejected: a range must go from low to high
5Rejected: the file has 4 pages

Merge order and rotation

Merge PDF Files joins the files in the order of the file list. Use the up and down arrows next to each file to change the order before you convert.

Rotate PDF Pages turns every page in the file by the angle chosen in Clockwise rotation: 90, 180 or 270 degrees. The angle is added to any rotation the page already has, so a page rotated by 90 and then by 270 degrees is back where it started.

To fix one sideways page in a longer file, extract that page, rotate it, then merge the parts back in order.

What the new file keeps

Merge PDF Files and Extract PDF Pages create an empty PDF and copy the pages into it with the copyPages function of pdf-lib. Anything stored for the whole document, rather than on a page, is left behind. Rotate PDF Pages opens the whole document, changes the rotation of each page and saves the result as a new file, so the document-level parts stay.

Checked by running the three tools on a test PDF that contained each of these parts.
Part of the PDFMerge or extractRotate
Page content and page sizeKeptKept
Links to web addressesKeptKept
BookmarksNot copiedKept
Page labelsNot copiedKept
Files attached to the documentNot copiedKept
Document titleNot copiedKept
Form fieldsThe boxes stay on the page, but the file no longer lists them as fieldsKept
Digital signatureNo longer validNo longer valid

Signed and encrypted PDFs

A digital signature covers the exact bytes of the signed file. Each of the three tools writes a new file, so the signature no longer matches the bytes and cannot be validated. This applies to Rotate PDF Pages too, even though it keeps the rest of the document. If the recipient needs a valid signature, send the signed original unchanged.

The three tools reject encrypted PDFs, including files that open without a password but restrict editing.

The sample files

The examples below use page-a.pdf and page-b.pdf. Each is a single 360 × 480 point page with a large letter A or B. Neither has bookmarks, form fields or a signature, so they only show order and rotation.

Merging A, then B gives a 2-page file with A first. Extracting page 2 from that file gives B alone. Rotating A by 90 degrees turns the page clockwise onto its side.

Checks before you send the file

  1. Check the page count in the result line, for example PDF · Pages: 2.
  2. Open the download and page through all of it. Look for pages that are missing, repeated, sideways or upside down.
  3. If the original had bookmarks, form fields, attachments or a signature, compare it with the table above and decide whether to send the original instead.
  4. Keep the original. The tools do not change the file you selected; they create a new one.

Examples

Merge PDF Files

Input files

page-a.pdf1,015 B
page-b.pdf1,015 B

Output file

merge-pdf-result.pdf1.3 KB

PDF · Pages: 2

Extract PDF Pages

Input files

Output file

extract-pdf-result.pdf981 B

PDF · Pages: 1

Pages to extract: 2

Rotate PDF Pages

Input files

page-a.pdf1,015 B

Output file

rotate-pdf-result.pdf1 KB

PDF · Pages: 1

Sources