Markdown سے PDF کنورٹر

استعمال کا طریقہ 3 مراحل
  1. Markdown عبارت چسپاں کریں میں اپنا Markdown چسپاں کریں۔
  2. فارمیٹ شدہ پیش منظر دیکھیں۔
  3. PDF بنائیں اور پرنٹ کریں دبائیں اور پرنٹ ونڈو میں Save as PDF چنیں۔

پیش منظر

تیار شدہ دستاویز

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

Markdown آپ کے براؤزر میں شامل marked پارسر سے HTML میں بدلا جاتا ہے، وہ HTML نئے ٹیب میں کھلتا ہے، اور جب آپ منزل کے طور پر "Save as PDF" چنتے ہیں تو آپ کے براؤزر کا پرنٹ ڈائیلاگ PDF لکھ دیتا ہے۔ یہ چند قواعد نہیں بلکہ مکمل CommonMark پارسر ہے، اس لیے کاغذ پر وہی ملتا ہے جو کوئی Markdown ایڈیٹر اسکرین پر دکھاتا۔

چھٹے درجے تک سرخیاں، نقطوں والی اور شمار شدہ فہرستیں بشمول ایک دوسرے کے اندر رکھی ہوئی، پائپ والی جدولیں، باڑ والا اور اندرونی کوڈ، اقتباسات، روابط، تصاویر، جلی، ترچھے حروف اور افقی لکیریں سب پیش کی جاتی ہیں۔ Markdown کے اندر HTML جائز ہے اور اسی لیے وہ بھی پیش ہوتا ہے، مگر پہلے اس سے اسکرپٹ، سرایت شدہ فریم، ایونٹ ہینڈلر اور javascript: پتے ہٹا دیے جاتے ہیں، کیونکہ یہ نتیجہ ایک ایسی کھڑکی میں لکھا جاتا ہے جو پھر چلتی ہے۔

ایسی دستاویز بنانا جو بھیجی جا سکے

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

Markdown exists so writing does not stop

The point of Markdown is that structure is typed rather than clicked. A hash makes a heading, a hyphen makes a list item, asterisks make something bold, and none of it requires leaving the keyboard or waiting for a toolbar. That is why notes, documentation and half the internet's drafts are written in it.

The awkward moment comes at the end, when somebody who does not use Markdown needs to read the result. They want a document, not a text file full of punctuation, and a PDF is the usual answer.

Your browser writes the file

The Markdown is rendered to a formatted page, that page opens in a new tab, and your browser's print dialogue appears. Choosing Save as PDF as the destination produces the file. Nothing is uploaded and nothing downloads on its own.

Two of the dialogue's defaults are set for printing web pages rather than making documents, and both want changing. Turn off headers and footers, or every page carries a URL and a timestamp. Check the paper size, which follows your system locale and may not match wherever the document is going. A third is worth knowing about: background graphics is off by default, and with it off, table heading shading and code block backgrounds print as plain white.

Know which Markdown you are writing

Markdown has no single specification. Every renderer supports a different set of extensions, which is why a document that looks right in one editor comes out wrong somewhere else. Knowing which dialect you are writing to is not pedantry; it is the difference between a clean document and a page of stray punctuation.

The [msm_tool slug="markdown-to-pdf"] renders CommonMark, plus the pipe tables and strikethrough that GitHub added. In practice that covers everything most people write: headings to six levels, bulleted and numbered lists including nested ones, tables, fenced and inline code, block quotes, links, images, bold, italics and horizontal rules.

What falls outside it is the layer of extensions that particular tools invented — footnotes, definition lists, admonition blocks, and the YAML front matter that static site generators put at the top of a file. Those render as ordinary text rather than disappearing, which is the honest failure mode: you can see what did not convert instead of wondering what happened to it.

Raw HTML, and why it is cleaned first

Markdown permits HTML inside it, and always has. That is part of the specification rather than a quirk, and it is how people get a table or a footnote into a document whose renderer lacks them.

It also means a Markdown file can carry a script. When that file is rendered and handed to a print window, the script runs, and the file you pasted may have come from a repository you have never read. So the rendered output is stripped first: script and frame elements removed, event handler attributes removed, and addresses that are not ordinary web or mail links dropped. Formatting HTML survives untouched. This costs you nothing you wanted and removes something you did not ask for.

Writing so it prints well

  • Give tables room. A wide pipe table is cramped on portrait A4. Switch to landscape in the print dialogue rather than reducing the scale, which shrinks everything else with it.
  • Keep code lines short. A fenced block wider than the page is wrapped rather than clipped, so nothing is lost, but the line breaks fall wherever the page ends rather than where you put them.
  • Use full addresses for images. A relative path has nothing to resolve against once the page is built from your text alone, so the image simply will not appear.
  • Write links out where it matters. They stay clickable in most PDF readers and are invisible on paper, so a document meant to be printed should carry the address in the text.

What the page breaks do, and do not, respect

Where a page ends is decided by the print engine, not by you. Three rules are set on your behalf, because they are the ones that make printed documents look broken when they are missing: table rows and images are kept whole rather than split down the middle, a table's heading row repeats at the top of every page it runs onto, and a heading is not left stranded at the foot of a page with its section overleaf.

Beyond that you have no control. You cannot force a section onto a fresh page, and on a long structured document a break will eventually fall somewhere awkward. A few pages is comfortable; a fifty-page manual wants a tool that understands pagination.

Check the preview, not the source

The print dialogue's preview panel shows exactly what the file will contain, and it is where an unconverted extension becomes visible — a footnote marker sitting as a bracketed number, a block of front matter across the top of page one.

Read it as a reader rather than as the author. You know what the source said; the person receiving the PDF only sees what came out.

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

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

CommonMark، اور اس کے ساتھ وہ پائپ والی جدولیں اور کاٹے ہوئے حروف جو GitHub نے شامل کیے۔ Markdown کی کوئی ایک معیاری تعریف نہیں، اس لیے اس سے آگے کی توسیعات — حواشی، تعریفی فہرستیں، تنبیہی خانے، ابتدائی YAML — خاموشی سے غائب ہونے کے بجائے عام متن کے طور پر پیش ہوتی ہیں۔
کیونکہ تین خطوں کی سطروں کے درمیان رکھا YAML بلاک Markdown کا حصہ نہیں بلکہ جامد سائٹ بنانے والے اوزار کا طریقہ ہے۔ پہلی سطر افقی لکیر بن جاتی ہے اور باقی متن۔ چسپاں کرنے سے پہلے اسے حذف کر دیں۔
جی ہاں، اور یہ Markdown کا معیاری رویہ ہے، مگر صفائی کے بعد۔ اسکرپٹ، سرایت شدہ فریم، ایونٹ ہینڈلر اور javascript: پتے ہٹا دیے جاتے ہیں، اس لیے کسی ایسے ذخیرے کا README جو آپ نے پڑھا نہ ہو، چھپائی کے وقت کچھ نہیں چلا سکتا۔
نہیں۔ تبدیلی آپ کے براؤزر میں ہوتی ہے اور نتیجہ آپ ہی کے براؤزر کے پرنٹ انجن کو دیا جاتا ہے۔ کچھ اپ لوڈ یا محفوظ نہیں کیا جاتا۔
براہِ راست نہیں، مگر تین اصول آپ کے لیے لاگو کیے جاتے ہیں: جدول کی سطریں اور تصاویر پوری رکھی جاتی ہیں، جدول کی سرخی ہر صفحے پر دہرائی جاتی ہے، اور کوئی سرخی صفحے کے پاؤں میں تنہا نہیں چھوڑی جاتی۔ صفحہ اصل میں کہاں ختم ہوگا، یہ اب بھی پرنٹ انجن کا فیصلہ ہے۔

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