PDF Tools ابزار به‌روزرسانی شد 7 ساعت پیش

HTML to PDF Converter Online Free

HTML to PDF Converter turns markup or a web page into a downloadable PDF. Paste HTML, upload a .html or .htm file, or import a public URL, then choose the paper size, orientation, margins and print options.

The conversion runs on the server. For a URL, the server fetches the page and renders it in a headless browser. For pasted or uploaded HTML, it renders the markup directly. The result is a link to a generated PDF.

The tool is useful for invoices, reports, articles, receipts and simple documents that need a fixed, shareable layout. It is not a full browser print dialog, and some pages will not render exactly as they do on screen.

HTML Input PDF Output Convert Online Download PDF

استفاده HTML to PDF Converter Online Free

تنظیمات ژنراتور

Mode 1
کد HTML را جای‌گذاری کنید
Mode 2
بارگذاری فایل HTML
Mode 3
وارد کردن از URL
HTML خام یا یک قطعه HTML را الصاق کنید. تولیدکننده آن را مستقیماً رندر خواهد کرد.
پیشرفته (چاپ مشابه کروم)
بهترین کاربرد برای ضبط URL است؛ تبدیل HTML ممکن است متفاوت باشد.
5 MB
دانلود PDF
آماده یک نوع منبع را برای شروع تولید PDF انتخاب کنید.
لینک ابزار
به کلیپ‌بورد کپی شد.
به بهبود این ابزار کمک کنید

محتوا را بخوانید

بیاموزید که این ابزار چگونه کار می‌کند و چه زمانی باید از آن استفاده کنید.

Three ways to provide content

Paste HTML is the default mode. It gives you a code editor where you can enter a full document or a fragment. The generator renders the markup directly, so styles, tables and images work if their URLs are reachable.

Upload HTML file accepts a .html or .htm file up to 5 MB. The file is sent to the server and rendered. This is convenient for a saved page or a report exported from another tool.

Import from URL asks the server to fetch a public page. You can choose a readability article extraction or a full page capture. The readability mode tries to isolate the main article; the full page mode keeps the surrounding layout.

Print options

The advanced panel mirrors a browser's print settings. Layout can be portrait or landscape. Paper size can be A4, Letter, Legal, A3 or A5. Margins are set in millimetres for the top, right, bottom and left, with 10 mm as the default and a range from 0 to 50.

Scale ranges from 0.1 to 2 and is most useful for URL capture; HTML conversion may handle it differently. Print background controls whether background colours and images are included. Header and footer adds the browser's standard page header and footer, which usually includes the page title and page numbers.

The dynamic wait setting is for URL capture. It gives the page time to load scripts and fonts before the PDF is taken, from 0 to 30,000 milliseconds with a 1,000 ms default. A longer wait helps a slow page but makes the conversion slower.

How to convert HTML to PDF

  1. Choose Paste HTML, Upload HTML file or Import from URL.
  2. Enter the markup, select the file, or enter the public page address.
  3. Open Advanced and set the layout, paper size and margins.
  4. Decide whether to print backgrounds and whether to include a header and footer.
  5. For a URL, choose readability or full page and set a dynamic wait if the page loads content with scripts.
  6. Click Generate PDF and wait for the status to change to completed.
  7. Click Download PDF and open the file to check the pagination.

If the PDF is blank, the page may have blocked the fetch, required a login, or rendered after the capture. Try a longer wait, or use the pasted HTML mode with the content you can see.

HTML versus URL capture

Pasted HTML gives you the most control. You can include inline CSS, a style block and absolute image URLs. Relative image paths will not resolve because there is no page base URL. Use absolute URLs or embed the images as data URIs.

A URL capture includes the page's own CSS and scripts, but the server's browser may see a different page from yours. A cookie banner, a login wall, a bot check or a region-specific redirect can change the output. Private hosts are blocked by default; the Allow private hosts switch is for trusted internal testing, not for public use.

Readability mode is best for an article or a blog post. Full page mode is better for a landing page, a receipt or a layout where the header and sidebar matter. Try both if the first result is missing content.

Limits and rendering caveats

The HTML file limit is 5 MB. Pasted HTML does not have a visible character counter, but a very large document can still time out. The dynamic wait is capped at 30 seconds, and the server has its own request timeout.

JavaScript-heavy pages may not finish rendering. Infinite scroll, lazy-loaded images and client-side routing can produce an incomplete PDF. A page that requires a login cannot be captured by an anonymous server request.

Some print options may be ignored or applied differently depending on the rendering path. Test the output rather than assuming every control has an effect. Fonts may substitute if the server does not have the same font as your browser.

Privacy and safe use

Pasted HTML, uploaded files and URLs are sent to the server for rendering. Do not submit confidential documents, credentials or internal pages unless you are allowed to share them. The generated PDF is stored temporarily and returned as a link.

Do not enable private hosts for an untrusted URL. That switch exists for controlled environments and can expose internal services if misused. Use a public URL or pasted HTML for normal work.

Download the PDF promptly. A temporary link may expire, and the page does not provide a permanent document library. Keep your own copy if the file matters.

Practical uses

  • Invoices and receipts: turn an HTML template into a fixed PDF.
  • Articles: save a clean readability version of a public page.
  • Reports: convert a generated HTML report with tables.
  • Portfolios: capture a simple page for sharing.
  • Documentation: archive a page as it looked at a point in time.
  • Print preparation: set A4 or Letter with controlled margins.

Styling the PDF output

For pasted HTML, include a style block or inline styles. Use a print-friendly font size, enough line height and page margins that leave room for binding if the document will be printed. Absolute image URLs are safer than relative paths because the server has no page base to resolve them.

Tables need explicit widths and borders. A table that relies on a screen layout can overflow the page or split awkwardly. Add page-break-inside: avoid to rows or blocks that should stay together, and test the result rather than assuming the browser will honour every rule.

Background colours and images are optional at print time. If a design depends on a coloured header, enable Print background. If you want a clean document that saves ink, leave it off and use borders or text instead of colour blocks.

Pagination and page breaks

PDF pagination is controlled by the paper size, margins and content flow. A long table may split across pages; a heading may land at the bottom of one page with its content on the next. CSS page-break rules can help, but the renderer decides how faithfully to apply them.

Use a consistent heading hierarchy and avoid fixed-height sections that are taller than the printable area. A section that cannot fit will be pushed to the next page, leaving a gap. For a report, that is often acceptable; for a receipt, it may look wrong.

Check the first and last page carefully. A footer or page number may overlap the bottom margin, and a wide table may be clipped on the right. Adjust the margins or scale and generate again.

Troubleshooting the result

  • Blank page: the URL may have blocked the request, or the HTML may be empty after scripts run. Try pasted HTML or a longer wait.
  • Missing images: the image URLs may be relative, private or blocked by hotlink protection. Use absolute public URLs.
  • Wrong fonts: the server may not have the font. Use a web-safe family or embed the font as a data URI.
  • Cut-off content: reduce the scale, use a larger paper size, or adjust the margins.
  • Login page instead of the article: the server cannot use your browser session. Capture a public page or paste the content.
  • Timeout: the page may be too heavy or the dynamic wait too long. Simplify the source and try again.

Frequently Asked Questions

پرسش‌های متداول

پاسخ‌های کوتاه به پرسش‌هایی که کاربران پیش از اعتماد به نتیجه مطرح می‌کنند.

Yes. Use Import from URL and choose readability or full page. The page must be publicly reachable and must not require a login.

The uploaded HTML file limit is 5 MB. Very large pasted HTML can still time out during rendering.

The page may have blocked the fetch, required a login, or loaded too slowly. Try a longer dynamic wait or paste the HTML directly.

Yes, when Print background is enabled. Turn it off for a cleaner document with less ink.

The Header / footer option adds the browser's standard header and footer, which usually includes the page title and page numbers.

Yes. Rendering happens on the server, so the HTML, file or URL request leaves your browser.

نظرات (0)

برای بحث کاربران، موارد حاشیه‌ای و نکات پیگیری.
یک نظر بگذارید
نظر شما پس از ارسال به‌صورت عمومی نمایش داده خواهد شد.
هنوز نظری ثبت نشده است. اولین نفری باشید که نظر می‌دهد!
به ما اطلاع دهید!
گزارش مشکل این ابزار

مسئله‌ای را که با آن مواجه شدید شرح دهید تا بتوانیم آن را بررسی کرده و ابزار را بهبود بخشیم.

چه چیزی بیشتر کمک می‌کند
ورودی، نتیجهٔ مورد انتظار، نتیجهٔ واقعی، مرورگر/دستگاه و در صورت کمک‌کننده بودن، یک اسکرین‌شات را درج کنید.
دکمهٔ اسکرین‌شات صفحه را در مرورگر ثبت می‌کند و تصویر تولیدشده را به این فرم پیوست می‌کند.
اسکرین‌شات تمام‌صفحه
در مرورگر شما با newisty ضبط شده است.
هنوز هیچ اسکرین‌شاتی گرفته نشده است.
ابزار گزارش