How to Print Custom Word Pages to PDF Without Creating a 0 KB File
Question details
Users need a way to successfully export or print specific custom page ranges from a Word document to PDF when the document contains section breaks, avoiding corrupt outputs.
- Product
- Word
- Device & OS
- not provided
- Scenario
- Exporting or printing a specific custom page range from a sectioned Word document to a PDF file.
- Observed behavior
- When specifying a custom page range using simple page numbers in a sectioned document, the application outputs a corrupted or empty 0 KB PDF file instead of the intended pages.
Verify whether your Word document contains multiple sections by right-clicking the bottom status bar and enabling the 'Section' indicator, as section breaks change how page numbers are referenced.
Use Section-Aware Page References (p#s# Format)
Specify both the page number and the section number in the print range to help the print engine correctly locate and export pages from sectioned documents.
When a document is divided into multiple sections, simple page numbers are no longer sufficient for the application to locate the exact pages. You must explicitly define both the page (p) and the section (s) to prevent the export process from failing and generating a 0 KB file.
Press Ctrl + P on your keyboard to open the Print menu, or navigate to File > Print.
Under the Printer dropdown menu, select 'Microsoft Print to PDF' or your preferred PDF conversion software.
In the 'Pages' input box under Settings, enter the range using the 'p#s#' syntax. For example, to print from page 2 of section 1 through page 5 of section 2, type 'p2s1-p5s2'.
Click the Print button, choose a save location, and save the file. The PDF will now generate successfully with the correct file size and content.
Easily Export Custom Pages to PDF with WPS Office
WPS Office features a powerful, built-in PDF converter that effortlessly handles section breaks and custom page ranges, allowing you to export documents correctly without using complex syntax.
- 1. Open your document: Launch WPS Writer and open the document containing multiple sections.
- 2. Access PDF Export: Click on the 'Menu' button in the top-left corner and select 'Export to PDF'.
- 3. Set custom page range: In the Export to PDF dialog box, locate the 'Export range' section and select the 'Custom pages' option.
- 4. Export the file: Enter your desired page numbers intuitively into the box, and click the 'Export to PDF' button to generate a valid PDF file instantly.

Frequently Asked Questions
Why does exporting a custom page range in Word create a 0 KB PDF?
A 0 KB file usually occurs when the application fails to parse the requested print range. In documents with multiple sections, using simple page numbers confuses the print engine because multiple pages might share the same number across different sections, causing the export to fail.
How do I print a single page from a specific section?
You can print a single page by specifying just the page and section number in the 'Pages' box. For example, typing 'p3s2' will print exactly page 3 of section 2.
Can I mix whole sections and specific pages in the print range?
Yes, you can combine formats by separating them with commas. For instance, typing 's1, p2s3-p4s3' will print the entirety of section 1, plus pages 2 through 4 of section 3.
Does the p#s# format work with 'Save As PDF'?
Yes, if you go to File > Save As and select PDF, you can click on 'Options' in the save dialog. From there, you can enter the 'p#s#' syntax in the Page Range field to achieve the same accurate section-aware export.




