Submitted by Vievin t3_10gwlin in LifeProTips

I learnt this from my DnD days, when most of my character sheet was copied and pasted from various PDFs into the site we used. The formatting was often horrible, especially when I copied out of sidebars or tables. So what I did was select the relevant text in the PDF, copy it, paste it into the URL bar, ctrl-A and copy from the URL bar, and paste it into the website. Boom, all line breaks gone.

A more practical application for this is when you're applying to jobs, and need to basically copy the contents of your resume onto their web forms.

1,105

Comments

You must log in or register to comment.

Dreunin t1_j5589iv wrote

I've always done this! People consider me insane but can name no better alternative. Ctrl + shift + v rarely gets rid of the line breaks.

If someone knows a shortcut, I'd love to know

134

BranWafr t1_j55f0rz wrote

Notepad++ can easily strip out line breaks, so I just paste into that and remove the line breaks with a search and replace.

71

Dreunin t1_j55f7tj wrote

Sure, you can do that, but it's still not as fast

41

CapnHanSolo t1_j560szk wrote

What if I just press ctrl+f on the pdf and use the find bar. Would that work

6

Bunanuhs t1_j57qgrq wrote

You use the replace function and replace "^p" with a single space.

5

dubbzy104 t1_j562vix wrote

Probably not. Notepad++ and other text editors look for the new line character “\n”, whereas most pdf search tools will look for the literal characters \ and n

2

DigitalSteven1 t1_j564f9s wrote

Just a minor correction, the almost universal escape character is a backslash. i.e. it's "\n" rather than "/n."

Windows does some funny stuff in cmd and powershell, being caret (^) and backtick (`). Afaik "/" isn't used anywhere, though.

2

dubbzy104 t1_j565brs wrote

Gah, you’re right! I blame it on me being on mobile so the key locations are different, and me being sleep deprived. Surely it’s not because I’m a bad programmer…

2

Old_timey_brain t1_j59v0ar wrote

Are these not simple formatting options we want to get rid of?

I paste into a new email set to plain text, then copy back out.

1

bbqfoot34 t1_j58q9ma wrote

I really tried with notepad but it doesn't seem to strip everything as effectively as a url. I wish there was an add-on because sometimes there's a lot of text

1

BranWafr t1_j592dqq wrote

Not Notepad, Notepad++, they are very different programs.

1

deathstark t1_j56e068 wrote

If you paste into excel, you can press CTRL J in the find box and replace with space. Probably not quicker though

3

Che_Pibe t1_j56oq12 wrote

I mentioned above, if you're on a Mac, paste into a spotlight search (cmd+space) and copy it.

1

HornetKick t1_j5gcov8 wrote

>shortcut

Just use Notepad. It removes formatting automatically. I keep a version with my resume just to be able to copy/paste quickly.

1

RoamingArchon t1_j55q6k5 wrote

Just wanted to add, anything you copy into the address bar of your browser will be searched on the Internet using the browser's default search engine, even without submitting it.

Don't put anything sensitive in the URL bar!

67

One_Reflection_9322 t1_j55x9lx wrote

Exactly. So just paste it into another application, not the browser's url box.

Also, turn off that feature. I have on all my browsers.

19

imkinagana t1_j556652 wrote

You can simply paste as plain text with ctrl + shift + v

28

Dreunin t1_j5582g7 wrote

This doesn't always get rid of the line breaks

29

bayouth t1_j5524dm wrote

cmnd-shift v does this in most applications

23

YabbaDabbaUngaBunga t1_j562ufz wrote

If you're doing this sort of thing frequently, learn regular expressions. Yes, the barrier to entry can be a little high for an otherwise principally non-technical person, however if text manipulation is a frequent task of yours, you'll thank yourself for having learned.

Many editors (Notepad++, etc.) support regular expressions for search-and-replace. In this case you'd simply search for \s+ (any whitespace characters) and replace them with a single space. This will convert all sequences of newlines, tabs, and spaces, to a single space.

ETA: One caveat with OP's LPT is character length limits on input fields; Chrome appears to be ~2MB, which is really, really high for most practical uses of this trick. But, if you were to copy/paste a whole PDF textbook, you could run into problems. See: https://chromium.googlesource.com/chromium/src/+/master/docs/security/url_display_guidelines/url_display_guidelines.md#URL-Length

20

turok2 t1_j55am56 wrote

I tend to use the start menu.

Windows key. ctrl-v. ctrl-a. ctrl-x.

10

FreeXFall t1_j55q8j4 wrote

The key here is removing line breaks, not formatting. Nice trick.

7

Garrth_ t1_j557mk2 wrote

or use notepad like human

5

Vievin OP t1_j55c7vj wrote

Notepad keeps the original line breaks.

9

wowbackatitReddit t1_j55p8v3 wrote

You can also use Notepad on Windows. Helps because it's meant to hold more than one line

3

PaxNova t1_j55ykc7 wrote

In Word, you can also highlight the text you want to remove line breaks from and do find/replace.

One the find line, search for ^p. On the replace line, put nothing. ^p means "new paragraph" in Word. You can also replace it with a space if you want.

3

DaBIGmeow888 t1_j55ilqy wrote

Dang I've been using online page break remover website but this is faster.

2

Che_Pibe t1_j56ojhl wrote

Line breaks, XML data, all the hidden junk. This is one great LPT!

If you're on a Mac, Command+Space Bar to get a spotlight search, then paste/copy is even faster (in my opinion)

2

ReformedWiggles t1_j59gljo wrote

It also gets rid of fonts, background color etc. I always do this, always have.

2

keepthetips t1_j5505nw wrote

Hello and welcome to r/LifeProTips!

Please help us decide if this post is a good fit for the subreddit by up or downvoting this comment.

If you think that this is great advice to improve your life, please upvote. If you think this doesn't help you in any way, please downvote. If you don't care, leave it for the others to decide.

1

talk_to_arpit_2 t1_j55vup6 wrote

lol.. and I thought, it was only me who was doing it; I basically do it to get rid of all fancy formatting and want plain text, to copy

1

heidismiles t1_j55wyzd wrote

If you use a developer app like Sublime Text, you can paste the whole paragraph and then hit the shortcut to join all the lines.

1

freihoch159 t1_j55yabs wrote

Also cleans layout coming from word or other things, my alternative for using the editor if i have some weird formatted text

1

breakbeat123 t1_j567fxa wrote

On word paste the text from your PDF.

Ctrl + H to replace.

Then find '^p' and replace with a space ' '.

This will turn everything into one paragraph, so if copying multiple paragraphs you'll have to check where to put the line break back in.

1

Skalion t1_j5686jk wrote

Posting it on editor will get rid of all the styling

1

SaskiavdM t1_j56xyoq wrote

Sublime Text

Select all and: Ctrl Shift J (join lines). Just know there is such a thing as multi-select and multi edit .. it saved me so much time over the years.

1

tinywoodenpig t1_j57trul wrote

thank you so much. i always copy paste homework instructions into a word document and it takes so long to fix the line breaks!! also happy cake day

1

Kludgel t1_j5805xj wrote

Pure gold. Thank you!

1

BlockMurky875 t1_j580x32 wrote

You’ve just saved me so much time

1

travleslowgofar t1_j58khid wrote

Subject line of an email is my go to for this.

1

caydayday t1_j58mkxp wrote

You can ask GPT to get rid of those too.

1

hassan789_ t1_j58vhaq wrote

Really good tip... Very poor explanation and description. Either way, thanks

1

TheMcGirlGal t1_j596buw wrote

I just rewrote everything when I wanted to do that with D&D stuff...

Fuck me.

1

Lucade2210 t1_j55squ0 wrote

Omg this sub is a joke.

−1