PDF Editing Issues

How to Number Front and Back PDF Pages with Matching Numbers

Adam DavisAdam Davis Nov 3, 2026 869 views

Question details

The user wants to assign matching page numbers to the front and back pages of a two-sided PDF document intended for duplex printing.

How to Number Front and Back PDF Pages with Matching Numbers
Product
PDF Editor
Device & OS
not provided
Scenario
Preparing a two-sided PDF document for duplex printing where each physical sheet needs a matching number for its front and back sides.
Observed behavior
Standard PDF editors do not offer a built-in numbering pattern for matching front and back page numbers (e.g., 1 Front, 1 Back).
Before you start

Ensure your PDF document is finalized in terms of page order and content before applying custom page labels or scripts, as adding or removing pages later will disrupt the numbering sequence.

Solution 1Recommended

Use a Custom JavaScript in Adobe Acrobat

Since Acrobat lacks a built-in feature for this specific numbering style, running a custom JavaScript is the most effective way to label pages as '1 Front', '1 Back', etc.

Adobe Acrobat allows users to execute custom JavaScript via the Action Wizard or the JavaScript console to manipulate page labels programmatically.

1
Open the JavaScript Console

Open your PDF in Adobe Acrobat. Press 'Ctrl + J' (Windows) or 'Cmd + J' (Mac) to open the JavaScript Debugger console.

2
Enter the Custom Script

In the console, write or paste a script that loops through the pages. The script should calculate the sheet number by dividing the page index by 2, and append 'Front' for even indexes and 'Back' for odd indexes.

3
Execute the Script

Highlight the script code in the console and press 'Ctrl + Enter' (Windows) or 'Cmd + Enter' (Mac) to run it. The page labels in the thumbnail pane will update to reflect the new matching numbers.

Use a Custom JavaScript in Adobe Acrobat
Scripting Knowledge Required: This method requires basic familiarity with JavaScript and Adobe Acrobat's API. Always save a backup of your PDF before running custom scripts.
Easy PDF Editing with WPS Office

Add Custom Page Numbers with WPS PDF

WPS PDF provides a user-friendly interface to insert and customize page numbers. You can use the Header and Footer tool to apply specific numbering formats to odd and even pages separately, making it easier to set up documents for duplex printing.

  1. 1. Open PDF in WPS Office: Launch WPS Office and open your PDF document using the WPS PDF tool.
  2. 2. Access Header and Footer: Navigate to the 'Insert' tab and click on 'Header and Footer', then select 'Add Header and Footer'.
  3. 3. Configure Odd Pages (Front): In the settings dialog, set your custom text (e.g., 'Front') alongside the page number macro. Under 'Page Range Options', select 'Odd pages only' and apply.
  4. 4. Configure Even Pages (Back): Repeat the process by adding a new Header/Footer. This time, use the text 'Back' with the page number macro, and select 'Even pages only' in the Page Range Options.
Free and lightweight PDF editorEasily customize headers, footers, and page numbersApply different settings to odd and even pagesFully compatible with standard PDF formats
microsoft office alternative - wps office

Frequently Asked Questions

Can I print front and back page numbers using standard printer settings?

Standard printer settings only control how the document is physically printed (e.g., duplex or simplex). They do not alter the actual page numbers or labels displayed on the document pages. You must add the numbers to the PDF before printing.

Is there a way to automatically number pages as 1A, 1B, 2A, 2B?

Similar to the 'Front' and 'Back' labeling, standard PDF editors do not have a built-in 1A/1B sequence. You would need to use a custom JavaScript or manually edit the page labels in the thumbnail panel.

Will custom page labels show up when the PDF is printed?

Page labels (which appear in the PDF viewer's navigation bar) do not automatically print on the physical page. To print the numbers, you must insert them as Headers and Footers or Bates Numbering directly onto the document pages.