PDF Printing Issues

How to Print Different PDF Pages from Different Printer Trays

Steve KSteve K Nov 5, 2026 868 views

Question details

The user needs to print a single PDF document containing pages of different sizes by directing each page to its corresponding printer tray.

How to Print Different PDF Pages from Different Printer Trays
Product
PDF Editor
Device & OS
not provided
Scenario
Printing mixed-size PDF pages requiring distinct paper trays, such as printing a standard document from the primary tray and an envelope from the bypass tray.
Observed behavior
The user wants the software to automatically request page-size-based printer settings so the printer hardware selects the correct tray for each specific page.
Before you start

Ensure your printer is properly loaded with the required paper sizes in their respective trays, and verify that your printer drivers are up to date to handle custom page-size commands.

Solution 1Recommended

Use JavaScript to Enable Page-Size Selection

Execute a JavaScript snippet in your PDF software to force the printer parameters to respect the individual page sizes of the document.

Advanced PDF applications allow you to use JavaScript to modify print parameters before sending the document to the printer.

This script enables the 'setPageSize' flag, instructing the printer driver to pull paper from the tray that matches each PDF page's exact dimensions.

1
Open the JavaScript Console

Launch your advanced PDF application and open the interactive JavaScript console, often accessed via Ctrl+J or through the developer tools menu.

2
Enter the Print Parameters Code

Type the following code into the console: var pp = this.getPrintParams(); var fv = pp.constants.flagValues; pp.flags = pp.flags | fv.setPageSize; this.print(pp);

3
Execute the Script

Run the script to initiate the print job. The software will now send the specific page-size requests to your printer.

Use JavaScript to Enable Page-Size Selection
Hardware Compatibility: Whether the correct tray is ultimately selected depends heavily on your specific printer drivers and their compatibility with your PDF software's print commands.
WPS PDF Solution

Effortlessly Manage Custom Print Jobs with WPS Office

WPS PDF offers an intuitive print interface that makes it easy to handle complex printing tasks, such as routing different pages to specific printer trays, without needing to write code.

  1. 1. Open the Document: Launch WPS Office and open your multi-format PDF file.
  2. 2. Access Print Settings: Click the 'Menu' button in the top left corner and select 'Print', or simply press Ctrl+P on your keyboard.
  3. 3. Configure Page Ranges: In the Print dialog, specify the exact page numbers you want to print from the first paper tray.
  4. 4. Adjust Printer Properties: Click 'Properties' to select the specific paper source or tray for those pages, print the batch, and repeat for the remaining pages using the alternate tray.
User-friendly print dialog for quick page range and tray configurationFully compatible with standard PDF files and all major printer driversAdvanced printing options like scaling, multiple pages per sheet, and custom subsetsLightweight application that processes large PDFs quickly and efficiently
QA img-9

Frequently Asked Questions

Why isn't my printer automatically switching trays based on PDF page size?

This often occurs if your printer driver overrides the application settings or does not support automatic tray switching. Ensure 'Choose paper source by PDF page size' is checked in your print settings if available, and update your printer drivers to the latest manufacturer version.

Can I print an envelope and a letter in the same print job?

Yes, if your PDF application and printer support page-size-based settings. Otherwise, the most reliable method is to print the letter pages and the envelope page as two separate manual print jobs, specifying the correct tray in the printer properties each time.

Does 'Choose paper source by PDF page size' work with all printers?

No, support varies significantly by manufacturer and model. Enterprise-grade and multi-tray office printers typically handle these commands well, while basic desktop printers often require manual tray selection.