Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Extra whitespace characters in exported PDF

New Here ,
Nov 14, 2024 Nov 14, 2024

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.

 Screenshot 2024-11-14 093843.png

 

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!

TOPICS
Bug , Import and export
655
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 15, 2024 Nov 15, 2024

What settings did you use to export the PDF?

Mike Witherell
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 15, 2024 Nov 15, 2024

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

 

Screenshot 2024-11-15 155133.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 15, 2024 Nov 15, 2024

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 15, 2024 Nov 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.)

 

Screenshot 2024-11-15 163411.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 15, 2024 Nov 15, 2024

Does it work with a different font.

Don't use the Basic Paragraph Style.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 15, 2024 Nov 15, 2024

Yep, it's fine if I change to almost any other font. And it's fine with Alverata with Small Caps. The issue seems to be only related to Alverata with OpenType All Small Caps.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 15, 2024 Nov 15, 2024

@Gavin316068439y9j

 

Is there any reason you need to use OpenType setting?

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 15, 2024 Nov 15, 2024

Just that that's the font style that was selected for these books, in terms of the visual design. The issue in the interactive PDFs (which we give to people who buy the physical books) only came to our attention after this project was finished and the physical books had been printed. (If there's no way to fix this issue, we might consider changing to a different font in future / revised printings of the books and acompanying PDFs, but that would be a last resort.)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 15, 2024 Nov 15, 2024

@Gavin316068439y9j

 

I meant - if you need to specifically use "OpenType All Small Caps" or just "Small Caps" option?

(I edited my post right after posting it) 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 15, 2024 Nov 15, 2024

Yep we specifically want All Small Caps.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 15, 2024 Nov 15, 2024

Is rhe ised font a postscript OTF or a True Type OTF. OTF can have the one or the other type. There is nothing wrong to use OTF. 

Are you able to open the font and resave it again as OTF? You will need FontLab or similar tools. 
Did you check if your paragraph styles have the correct language?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 16, 2024 Nov 16, 2024

I'm not sure, to be honest. I added the font via https://fonts.adobe.com/fonts/alverata.

 

I just tried removing and re-adding the font, in case that changes anything. The issue remains the same.

 

>Did you check if your paragraph styles have the correct language?

 

Yep, it's listed as "English: UK", which is correct.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 15, 2024 Nov 15, 2024
quote

Yep we specifically want All Small Caps.


By @Gavin316068439y9j

 

I know - but as you've said - "normal" option works fine - problem is with "OpenType" - so my questions was - do you need "OpenType" option? 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 16, 2024 Nov 16, 2024
quote
quote

Yep we specifically want All Small Caps.


By @Gavin316068439y9j

 

I know - but as you've said - "normal" option works fine - problem is with "OpenType" - so my questions was - do you need "OpenType" option? 


By @Robert at ID-Tasker

 

We specifically want All Small Caps, and OpenType All Small Caps is the only option available for that.

 

Screenshot 2024-11-16 101540.png

 

Just to be clear, All Small Caps and Small Caps are visually different.

Screenshot 2024-11-16 101738.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 16, 2024 Nov 16, 2024

@Gavin316068439y9j

 

Right. 

 

In that case - "All Caps" won't be the same? 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 16, 2024 Nov 16, 2024
LATEST

No All Caps is different as well.Screenshot 2024-11-16 133551.png

It is possible to get something that looks pretty close to All Small Caps using All Caps plus horizontal and vertical character scaling. It's kind of a hack, but could be a workaround if it's not possible to get to the bottom of what's really causing the issue.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines