PDFからコピーした文章の改行を直す方法
- 文章を貼り付け
- 「段落を残す」を選ぶ
- 結果をコピー
PDFから文章をコピーすると、行の終わりごとに改行が入り、貼り付けた先で、文章が途中で切れます。文章の改行を消す・整える で、この改行を直せます。
手順
- PDFを開き、文章をコピーします。
- このツールを開き、「文章を貼り付け」の欄に貼り付けます。
- 「整え方」で、「段落(空行)は残す」を選びます。
- 「整えた後」で、改行が直っているか確認します。
- 「結果をコピー」で、コピーして、使います。
なぜ改行が入るのか
PDFは、紙のように、1行ごとに文字を配置しています。そのため、コピーしたときに、行の終わりが、改行として入ります。文章のつながりとしての改行ではありません。
整え方の選び方
- 段落の区切りが、空行として入っている → 「段落(空行)は残す」
- 段落の区切りが見分けにくい、全部つなげたい → 「すべての改行を消す」
- 1文ごとに分けたい → 「文末(。!?)で改行する」
余分な空白も、直す
PDFからのコピーでは、行の途中に、余分な空白が入ることがあります。「余分な空白を消す」にも、チェックを入れると、整います。
文字を抜き出すツールとの組み合わせ
PDFから文字を取り出す別のツールで、PDF全体の文字を取り出し、このツールで、改行を整える、という使い方もできます。
縦書きのPDF
縦書きのPDFは、コピーすると、順番が崩れることがあります。このツールで、改行を整えても、順序は直りません。
例
論文のPDFの段落をコピーして、「段落(空行)は残す」で整え、翻訳ツールに貼り付けた。文が途中で切れず、正しく訳された。
つまずきやすい点
- 段落が分からなくなった:「すべての改行を消す」を選んだ可能性。「段落(空行)は残す」にする。
- ハイフンで単語が切れている(英文):行末のハイフンは、手動で直す。
- 文字化けしている:PDFの文字が、正しく取り出せていません。
よくある質問
改行を整えたあと、また元に戻せますか?
貼り付けた元の文章を残しておけば、やり直せます。
まとめ
PDFのコピーは、「段落(空行)は残す」で整えるのが基本。内容に合わせて選び直しましょう。
文章の改行を消す・整えるを使う(無料)あわせて使えるツール
- 文字数カウント(エントリーシート・レポート用):文章の文字数・行数・原稿用紙の枚数などを数えます。
- PDFから文字を抜き出す:PDFの文字を取り出して、コピーまたは保存できます。
- 全角・半角、ひらがな・カタカナを変換する:全角・半角、ひらがな・カタカナを変換します。
同じツールの、ほかの解説
How to Fix Line Breaks in Text Copied from a PDF
- Paste the text
- Choose keep paragraphs
- Copy the result
Text copied from a PDF has a line break at the end of each line, so sentences break midway where you paste them. Remove and Tidy Line Breaks in Text can fix these line breaks.
Steps
- Open the PDF and copy the text.
- Open this tool and paste into the "Paste text" field.
- Under "Tidying method", choose "Keep paragraphs (blank lines)".
- Check in "After tidying" that the line breaks are fixed.
- Copy with "Copy result" and use it.
Why the line breaks appear
A PDF places text line by line like paper. So when copied, the end of each line comes as a line break. They are not line breaks as part of the flow of the text.
Choosing the method
- Paragraph breaks come as blank lines → "Keep paragraphs (blank lines)"
- Paragraph breaks are hard to tell or you want everything joined → "Remove all line breaks"
- You want one sentence per line → "Break after sentence ends (。!?)"
Also fix extra spaces
Copying from a PDF can put extra spaces mid-line. Ticking "Remove extra spaces" tidies them too.
Combining with the text extraction tool
You can also use the separate tool that extracts text from a PDF to get the whole PDF's text, then tidy line breaks with this tool.
Vertical-writing PDFs
Copying from a vertical-writing PDF can scramble the order. Tidying line breaks with this tool does not fix the order.
Example
Copied a paragraph from a paper's PDF, tidied it with "Keep paragraphs (blank lines)" and pasted it into a translation tool. Sentences did not break midway and translated correctly.
Common stumbling blocks
- Paragraphs became indistinguishable: you may have chosen "Remove all line breaks". Use "Keep paragraphs (blank lines)".
- Words split by hyphens (English): fix end-of-line hyphens manually.
- Garbled text: the PDF's text could not be extracted correctly.
Frequently asked questions
Can I undo after tidying line breaks?
If you keep the original pasted text, you can redo it.
Summary
For PDF copies, "Keep paragraphs (blank lines)" is the basic tidy-up. Reselect according to the content.
Use "Remove and Tidy Line Breaks in Text" (free)Tools that go well with this
- Character Counter (for Applications and Reports): Count characters, lines and manuscript sheets of your text.
- Extract Text from PDF: Pull the text out of a PDF to copy or save.
- Convert Full-Width, Half-Width, Hiragana and Katakana: Convert full-width/half-width and hiragana/katakana.