Skip to main content
bethz11325333
Participant
July 5, 2018
Answered

End-of-line Hyphens delete when copying text from Adobe Acrobat

  • July 5, 2018
  • 2 replies
  • 4866 views

Hello all,

I'm documenting some lines of code that are intended to be copied and pasted out of the PDF into a Linux System or Notepad, but for some reason the pasted text deletes some of the hyphens found in the code when they appear at the end of a line. I've troubleshooted with different fonts, edited the type of hyphen used, and tried every relevant preference I could think of in Acrobat, but nothing has proved successful in retaining these end-of-line hyphens.

Any idea why this is happening or a solution to keeping the hyphens in the text if they fall at the end of the line?

I'm using Adobe Acrobat Pro DC. The document I spun the PDF from was written in Framemaker.

Thanks for your help!

This topic has been closed for replies.
Correct answer try67

That's actually a good thing. End-of-line hyphens are used in the DTP process to break up a word that can't be fit into the line, while keeping the spacing of all the lines equal. For example:

This is a very long sen-

tence, where the last

word is broken up.

They are not actually a part of the word, as opposed to hyphenated words, and therefore the PDF format provides a special flag that allows the creating application to insert them without it screwing up the text if it's exported to another format.

You wouldn't want the text above to come out like this, would you?

This is a very long sen-tence, where the last word is broken up.

If this flag was used incorrectly then that needs to be solved in the original application (FrameMaker). I don't believe you can do it in Acrobat itself.

2 replies

Legend
July 6, 2018

You have discovered something that has been proved true over and over for the last 20 years ago: PDF files are for reading and printing, not distributing things for reuse. Copy and paste is not likely to give exact results, and if there's anything code needs, it's exactness. Suggest that if you are serious about distributing code with your PDF, you include it as attachments, or as an accompanying ZIP.

Bear in mind that most people no longer use Reader to read PDF files, and each PDF viewer has its own quirks. Many will not show attachments so this is a less attractive solution than it once was.

Participant
February 20, 2020

Is a solution available to this? We have encountered the same problem and this is leading to serious issues as the user is not able to complete installation, which resulted in several bugs for the team to fix. Thanks.

Legend
February 20, 2020

I don't understand how your problem "user is not able to complete installation" relates to the original problem "PDF is not a good way to distribute code for exact copy/paste". Please explain.

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
July 5, 2018

That's actually a good thing. End-of-line hyphens are used in the DTP process to break up a word that can't be fit into the line, while keeping the spacing of all the lines equal. For example:

This is a very long sen-

tence, where the last

word is broken up.

They are not actually a part of the word, as opposed to hyphenated words, and therefore the PDF format provides a special flag that allows the creating application to insert them without it screwing up the text if it's exported to another format.

You wouldn't want the text above to come out like this, would you?

This is a very long sen-tence, where the last word is broken up.

If this flag was used incorrectly then that needs to be solved in the original application (FrameMaker). I don't believe you can do it in Acrobat itself.