سطر توڑ ہٹانے والا

استعمال کا طریقہ 3 مراحل
  1. اپنا عبارت چسپاں کریں۔
  2. موڈ چنیں اور یہ کہ لائنیں کس سے جڑیں: سطریں جوڑیں بذریعہ۔
  3. کارروائی کریں دبائیں، پھر کاپی کریں۔
نتیجہ

پیراگراف کھولتے وقت خالی سطر کو اصل پیراگراف وقفہ سمجھا جاتا ہے — یہی درکار ہوتا ہے جب عبارت کسی PDF یا سادہ متن والی ای میل سے نقل کی گئی ہو اور ہر سطر ادھوری ختم ہوتی ہو۔

یہ ٹول کیسے کام کرتا ہے

سطر کے اختتام پہلے یکساں کر دیے جاتے ہیں، اس لیے Windows پر لکھی گئی فائل اور macOS پر لکھی گئی فائل ایک جیسا برتاؤ کرتی ہیں۔ اس کے بعد طریقہ نتیجے کی شکل طے کرتا ہے: سب کچھ ایک بلاک میں جوڑ دینا، صرف خالی سطروں کے سلسلے سمیٹنا، یا ہر پیراگراف کے اندر جوڑنا اور انہیں الگ کرنے والی خالی سطریں برقرار رکھنا۔ جب عبارت PDF یا سخت لپیٹی ہوئی ای میل سے نقل کی جائے تو پیراگراف والا طریقہ اسی ٹوٹ پھوٹ سے میل کھاتا ہے۔

جوڑنے والا وہ ہے جو ٹوٹی ہوئی جگہ پر رکھ دیا جاتا ہے — تقریباً ہر بار ایک خالی جگہ، فہرست کو کوما والی ایک سطر بنانے کے لیے کوما اور خالی جگہ، یا سرے سے کچھ نہیں جب ٹوٹ ایسی چیز کو کاٹ رہی تھی جسے کبھی نہیں کٹنا چاہیے تھا۔ ہر سطر کو پہلے کترنا وہ آگے پیچھے کی خالی جگہیں ہٹا دیتا ہے جو سخت لپیٹی ہوئی عبارت عموماً ساتھ لاتی ہے۔ جو گنتی بتائی جاتی ہے وہ ختم ہونے والی سطری ٹوٹوں کی خالص تعداد ہے۔

درست طریقہ چننا

  • چسپاں کی گئی عبارت کے لیے پیراگراف والا طریقہ محفوظ انتخاب ہے: پیراگراف کے اندر کی سطریں جڑ جاتی ہیں اور پیراگرافوں کے درمیان کی خالی سطریں برقرار رہتی ہیں، اس لیے دستاویز کی ساخت بچ جاتی ہے۔
  • سب کچھ جوڑنا کسی ایک خانے کے لیے ہے: اسپریڈ شیٹ کے خانے، میٹا تفصیل، تلاش کا خانہ۔ ان پُٹ کتنا ہی لمبا ہو، یہ ایک ہی سطر بناتا ہے۔
  • اضافی ٹوٹیں سمیٹنا اور کچھ نہیں چھیڑتا: تین یا اس سے زیادہ نئی سطروں کا سلسلہ ایک خالی سطر بن جاتا ہے۔ الفاظ، وقفے اور پیراگراف کی ٹوٹیں جوں کی توں رہتی ہیں، جو اسے سب سے کم تباہ کن اختیار بناتا ہے۔
  • خالی جوڑنے والا الفاظ کو آپس میں ملا دیتا ہے: یہ ٹوٹے ہوئے URL یا کٹے ہوئے کوڈ شناخت کنندہ کے لیے درست ہے اور نثر کے لیے غلط، جہاں سطری ٹوٹ خالی جگہ کا کام کر رہی تھی۔

The problem this solves

Text copied out of a PDF, an email client or a terminal arrives with a line break at the end of every visual line rather than every paragraph. Paste it into a document and it stays broken at the width of the original, ignoring the width it is now in.

Removing those breaks lets the text reflow properly. The [msm_tool slug="remove-line-breaks"] does that, and it offers a paragraph mode because the naive version destroys something you usually want to keep.

Paragraph mode is the one to use

Stripping every line break turns an entire document into one continuous block. Technically correct, and rarely what anyone meant.

Paragraph mode treats a blank line as a paragraph boundary: breaks within a paragraph are removed so the text reflows, and the blank lines between paragraphs survive. That is almost always the right behaviour for prose from a PDF.

Use the plain mode when you genuinely want one line — preparing a value for a single-line field, or flattening text for a CSV cell.

Watch the joins

Two things to check in the result, because both look fine at a glance:

  1. Missing spaces. If the source had no trailing space before each break, joining two lines gives theend rather than the end. Scan for run-together words, particularly at the start of the document where you stop reading carefully.
  2. Hyphenated words. PDFs and typeset documents break words across lines with a hyphen. Removing the break leaves hyphen- ated or hyphen-ated in the middle of a sentence. There is no reliable way to detect this automatically — a genuine hyphen and a line-break hyphen look identical — so it needs a read-through.

What else comes out of a PDF

Line breaks are usually not the only problem. Text extracted from a PDF commonly carries:

  • Page headers and footers interleaved through the body, appearing every forty lines or so.
  • Page numbers on their own lines.
  • Non-breaking spaces and unusual space characters that look normal and break searches.
  • Curly quotes and en dashes, which is fine unless something downstream expects plain ASCII.
  • Text in the wrong order if the original had columns — the extraction reads across the page rather than down each column.

That last one is not fixable by removing line breaks and is worth checking before you spend time on the rest.

Windows line endings

Windows ends a line with a carriage return and a line feed. Text that has travelled between operating systems may carry both, one, or a mixture.

Removing only one of the pair leaves a stray character that displays as nothing in some places and as a visible artefact in others. If cleaned text still shows odd breaks or invisible characters, mixed line endings are the usual explanation.

Where line breaks are meaningful

Do not run this on:

  • Poetry or lyrics, where the line shape is the work.
  • Addresses, where each line is a field.
  • Code in any language, and especially Python and YAML.
  • Markdown, where a blank line separates paragraphs and two trailing spaces force a break.
  • Anything column-aligned, where position is the delimiter.

Keep the original

The joins are not reversible — once two lines are one, nothing knows where the break was. Work from a copy, particularly on a long document where a run-together word two thirds of the way down will not be spotted until someone else reads it.

اکثر پوچھے گئے سوالات

خاص طور پر سطر توڑ ہٹانے والا کے بارے میں۔ اس زمرے سے متعلق عمومی سوالات کے جواب زمرے کے صفحے پر موجود ہیں۔

پیراگراف والا طریقہ اور خالی جگہ والا جوڑنے والا۔ یہ ہر پیراگراف کے اندر سخت لپیٹی ہوئی سطریں جوڑ دیتا ہے اور پیراگراف کی ٹوٹیں اپنی جگہ چھوڑ دیتا ہے۔
جوڑنے والا کچھ نہیں پر لگا ہوا تھا، اس لیے ٹوٹ ہٹ گئی اور اس کی جگہ کچھ نہیں آیا۔ اس کے بجائے خالی جگہ چنیں۔
اندر جانے والی اور باہر آنے والی سطری ٹوٹوں کا فرق — نہ حروف کی تعداد، اور نہ متاثرہ پیراگرافوں کی۔
صرف اسی صورت میں جب آپ کترنے کو کہیں، جو جوڑنے سے پہلے ہر سطر کے آگے پیچھے کی خالی جگہیں ہٹا دیتا ہے۔ سطر کے اندر کے وقفے چھیڑے نہیں جاتے۔
جی ہاں۔ کچھ اور چلنے سے پہلے کیریج ریٹرن یکساں کر دیے جاتے ہیں، اس لیے ملے جلے سطری اختتام بھی وہی نتیجہ دیتے ہیں جو یکساں اختتام دیتے ہیں۔

نئے ٹولز، خصوصیات اور کارکردگی بڑھانے کے مشوروں کی اطلاع پانے کے لیے سبسکرائب کریں۔