How to Fix White Squares Appearing Instead of Spaces When Copying PDF Text
Question details
The user is trying to resolve an issue where spaces are replaced by white square characters when copying text from a PDF document.

- Product
- Device & OS
- not provided
- Scenario
- Copying and pasting text from a PDF document into a word processor or text editor.
- Observed behavior
- The text copies with white squares (often U+25A1 characters) in place of normal spaces, even though the PDF document visually appears to have correct spacing.
Paste the copied text into a plain text editor like Notepad first to confirm that the issue stems from the PDF's internal encoding rather than your word processor's formatting settings.
Use Find and Replace to Correct the Copied Text
The fastest way to resolve the issue for text you have already copied is to perform a global search-and-replace operation in your destination document.
PDFs rely on underlying font encodings. Sometimes, a source application maps the space character to an incorrect Unicode value, causing it to render as a unprintable character or white square when extracted.
You can easily fix this formatting error globally without having to manually delete and replace every single square.
Copy the text from your PDF and paste it into your word processor (such as WPS Writer or Microsoft Word).
Highlight one of the white squares in the pasted text and press Ctrl+C to copy it to your clipboard.
Press Ctrl+H to open the Find and Replace dialog box.
Paste the white square into the 'Find what' field, type a single space using your spacebar into the 'Replace with' field, and click 'Replace All'.

Correct the Source Document and Recreate the PDF
If you are the author of the document, fixing the font encoding at the source will permanently resolve the issue for anyone who downloads the PDF.
Extract Text Using OCR
If the PDF's encoding is severely broken and Find & Replace is too tedious, Optical Character Recognition (OCR) can read the visual spaces and bypass the hidden incorrect characters entirely.
Easily Fix PDF Text Issues with WPS Office
WPS Office provides a powerful suite of PDF tools, including highly accurate OCR and direct PDF-to-Word conversion, enabling you to extract text perfectly without worrying about broken font encodings or white squares.
- 1. Open PDF in WPS: Launch WPS Office and open the PDF document containing the text you want to extract.
- 2. Use PDF to Word or OCR: Go to the 'Tools' tab and select 'PDF to Word' to convert the document, or use the 'OCR' tool to scan and extract the text visually.
- 3. Copy Clean Text: Once converted or scanned, copy the perfectly formatted text without any white square encoding errors.

Frequently Asked Questions
Why does the PDF look fine on screen but copy with white squares?
The PDF visually displays the text correctly based on drawn shapes, but the underlying font encoding maps the space character to an incorrect Unicode value (such as U+25A1). Copying and pasting relies on this underlying code, not the visual display.
Can I prevent white squares when creating a PDF myself?
Yes. When saving or exporting a document to PDF, ensure you are using standard system fonts and check the 'embed fonts in the file' option. This preserves proper character mapping so text copies correctly.
Does using 'Paste as Plain Text' fix the white square issue?
Usually, no. 'Paste as Plain Text' strips formatting like bold, italics, and font sizes, but it preserves the underlying characters. Since the source character itself is encoded as a white square, it will still paste as one.
Is there a shortcut to remove all white squares at once?
Yes. In your word processor, press Ctrl+H to open the Find and Replace tool. Paste the white square into the 'Find' box, press the spacebar once in the 'Replace' box, and click 'Replace All'.




