Skip to main content
Participating Frequently
November 14, 2024
Question

Extra whitespace characters in exported PDF

  • November 14, 2024
  • 2 replies
  • 729 views

Hi there,

 

A user of a PDF I exported from InDesign has reported issues with not being able to search (in Acrobat) for certain text strings.

 

Looking at the PDF, I can reproduce the issue. It turns out there are extra whitespace characters in the PDF that aren't visible but prevent text searches from working. Cut & paste from the PDF into a text editor reveals these extra characters.

 

Here's a screenshot of a minimal test case I created. This shows:

  • The PDF open in Acrobat.
  • A (non case sensitive) search for "shield" only showing one result, where two instances of the word are clearly visible in the PDF.
  • The result of cutting & pasting the complete PDF text into a text editor. Note the extra newline in the first instance of "Shield". It seems this is what prevents search from finding that instance of the word.

 

 

It seems the issue is somehow related to the font. Alverata with OpenType All Small Caps seems to cause the issue in this case. (I have seen similar issues with other fonts though.)

 

Does anyone have any insight into what might be causing this? I'm unsure if it's an issue with InDesign, Acrobat, the PDF export, the font, or the PDF file format itself.

 

Thanks!

This topic has been closed for replies.

2 replies

Willi Adelberger
Inspiring
November 15, 2024

If this font causes this problem try to change the kerning from metric to optical.

Participating Frequently
November 15, 2024

Hi Willi, thanks for the suggestion! I've tried Metrics and Optical kerning and the issue is the same.

 

Here's a screenshot of the basic paragraph style options. The only unusual thing (as far as I can see) is using OpenType All Small Caps. In the advanced options, I'm not using any tracking, scaling, skewing, baseline shift, etc. (There's also no nested styles or GREP styles at work.)

 

Willi Adelberger
Inspiring
November 15, 2024

Does it work with a different font.

Don't use the Basic Paragraph Style.

Mike Witherell
Braniac
November 15, 2024

What settings did you use to export the PDF?

Mike Witherell
Participating Frequently
November 15, 2024

Hi Mike, I used these export settings. I also tried without Create Tagged PDF but it didn't change the result.