How to Set PDF Image Resolution and Page Size for OCR
Question details
The user needs to configure the correct page size and image resolution (PPI/DPI) when converting images to PDF to ensure high-quality Optical Character Recognition (OCR) results.

- Product
- PDF Editors
- Device & OS
- not provided
- Scenario
- Preparing scanned images or high-resolution pictures for accurate OCR processing within a PDF.
- Observed behavior
- PDF pages use physical dimensions rather than a universal document-wide PPI setting, making it difficult to maintain effective image resolution without manual dimension calculation during conversion.
Check your original image's pixel dimensions (e.g., 2472 × 4119 pixels) before conversion, as you will need these numbers to calculate the exact physical page size required for a target resolution like 300 DPI.
Calculate Dimensions and Use a Virtual PDF Printer
Calculate the physical page size based on your image's pixel dimensions and target resolution, then print to PDF using a custom paper size.
Because PDF pages use physical dimensions (inches or millimeters) instead of a fixed PPI setting, you must calculate the physical size that correctly accommodates your image's resolution to maintain its clarity for OCR.
Divide your image's pixel width and height by your target resolution. For example, a 2,472 × 4,119 pixel image divided by 300 PPI equates to a physical page size of approximately 8.24 × 13.73 inches.
Open your high-resolution image in your default system viewer and select the 'Print' option. Choose a virtual PDF printer from your list of available printers (e.g., Adobe PDF or WPS PDF).
Click on 'Properties' or 'Preferences', navigate to the paper size settings, and create a custom paper size matching your calculated dimensions (8.24 x 13.73 inches). Ensure the print quality is set to 300 DPI.
Click 'Print' or 'Save' to generate the PDF file. The embedded image will now retain the proper scaling and resolution, making it perfectly optimized for OCR extraction.

Use the img2pdf Utility via Command Line
Quickly convert images to PDF with a strictly defined DPI setting using a lightweight command-line tool, ideal for batch processing.
Optimize PDF Images and Perform OCR with WPS Office
WPS Office provides dedicated built-in tools to convert images to PDF at high quality and extract text seamlessly using its advanced OCR engine, eliminating the need for complex manual dimension calculations.
- 1. Open the Image to PDF Tool: Launch WPS Office, navigate to the 'Tools' tab, and click on the 'Image to PDF' feature.
- 2. Adjust conversion settings: Add your high-resolution images. In the export settings, select 'Original Size' to automatically maintain the image's inherent pixel data without compressing the resolution.
- 3. Run OCR: Once the PDF is generated, open it in WPS Office and click the 'OCR' button on the top toolbar to instantly recognize, edit, and extract text from your high-resolution images.

Frequently Asked Questions
Why does my PDF page not have a specific PPI or DPI setting?
PDF documents are vector-based frameworks that define pages in physical units (like inches, centimeters, or points) rather than pixels. PPI (Pixels Per Inch) and DPI (Dots Per Inch) apply only to the raster images embedded within the PDF, not the PDF page itself.
What is the best DPI for OCR processing?
A resolution of 300 DPI is generally considered the optimal standard for Optical Character Recognition (OCR). It provides enough detail for the software to accurately distinguish characters and formatting without creating unnecessarily bloated file sizes.
Can I add a high-resolution image to an existing blank PDF page?
Yes. You can create a blank PDF page set to your calculated physical dimensions and then use the 'Add Background' or 'Insert Image' tool in a PDF editor to place your high-resolution image exactly where needed. This approach preserves the original pixel data of the image.




