Fixing inter word whitespace for pdfs in .cls #56
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey there
I noticed I was having some problems when my CV was getting auto-parsed by some careers websites. The problem was that all parsed text was missing spaces between words.
After digging into it some more, I found out it's a problem in which PDF viewers mistakenly confuse inter word whitespace with other kinds of "unnecessary" whitespace (like the indent due to text justification), and thus removes it. I also noticed I was not the first one to have this problem.
This was not the case for all PDF viewers though, as MacOS' preview correctly injected the space characters when trying to copy and paste text from a rendered Deedy Resume. Nevertheless, I found out the whitespace removal error happened on:
The way around it I found was:
WordSpace={1.1}
on the default font.1.1
was the minimum inter word space size I found which fixed the problemYou can see the results here. Just download both of them, open them with one of the affected browser's PDF viewer, and try to copy and paste text from them:
(Make sure browser's cache is not affecting your tests)
I'm interested in compiling a list of viewers for which this works and does not work, and find quick fixes for expanded compatibility. I'll probably try and parse a Deedy Resume with OpenCTAS, but I'll need some more time to install it first.
THIS FIX WORKS ON:
* = Original already worked with this one
** = Original worked with varying degrees of success, now fixed
DOES NOT WORK ON:
N/A
P.S.: If you need inter-word whitespaces to work on a viewer and this quick fix didn't work, try using a bigger word space, like
1.5
. A bigger word space may help the viewer to discern where to add spaces.P.S.2: I understand this make be a change that won't necessarily be merged into master, as we are changing the XeteX dependency. Nevertheless, I'm happy so long as people find this useful.