Chuyển đổi các trang web hoặc tệp HTML thành tài liệu PDF Các tập tin vẫn riêng tư. Tự động xóa sau 2 giờ. Dịch vụ miễn phí cho các tài liệu lên tới 50 MB và 3 nhiệm vụ mỗi giờ. Dịch vụ chuyên nghiệp cho các tài liệu lên đến 100 MB Free service for documents up to
50 Mb and 3 tasks per hour. PRO service for documents up to 100 Mb
Tiện ích mở rộng trình duyệt 'Lưu dưới dạng PDF'Chuyển đổi bất kỳ trang web nào sang PDF với dấu trang này cho trình duyệt của bạn1 Nhấn Ctrl+Shift+B để hiển thị thanh đánh dấu. Press Ctrl+Shift+B to show the Bookmarks bar. 2 Kéo nút bên dưới vào thanh dấu trang của trình duyệt của bạn. Drag the button below to your browser's Bookmarks Bar. 3 Bạn đã xong! Bây giờ tải một trang web trong trình duyệt của bạn và nhấp vào dấu trang 'Lưu dưới dạng PDF' để chuyển đổi nó thành tài liệu PDF. You're done! Now load a web page in your browser and click the 'Save as PDF' bookmark to convert it to a
PDF document. Cách chuyển đổi HTML thành PDFDưới đây chúng tôi chỉ ra cách chuyển đổi các trang web sang tài liệu PDFBước 1: Dán URL trang web của bạnNhiều trang web có thể được chuyển đổi tại một thời điểm. Dán từng URL trên một dòng riêng biệt. Bước 2: Lưu kết quả PDFNhấp vào Convert HTML to PDF và đợi cho đến khi xử lý hoàn tất. Sau đó nhấn Download và lưu tài liệu PDF của bạn. Cách thêm liên kết 'Lưu vào PDF' vào trang web của bạn
Có một trang web? Hãy để khách truy cập của bạn lưu các trang của trang web của bạn dưới dạng PDF Nhiều lần, chúng tôi đã phải đối mặt với vấn đề lưu một trang web cụ thể hoặc bất kỳ yếu tố cụ thể trực tuyến nào cần lưu dưới dạng tệp PDF trong khi sử dụng trình duyệt. Trong trường hợp đó, chúng tôi đã sử dụng tiện ích mở rộng của bên thứ 3 hoặc bất kỳ ứng dụng hoặc công cụ nào để tạo nó thành tệp PDF. Trong bài viết này, chúng tôi sẽ học cách thiết kế tệp PDF do thời gian chạy qua HTML. Nhiệm vụ này có thể đạt được theo 3 cách: & NBSP; & nbsp; - In trang web cụ thể và lưu nó dưới dạng pdf
- Sử dụng thư viện JSPDF
- Sử dụng thư viện HTML2PDF
Hãy để hiểu tất cả 3 khái niệm từng người một với sự trợ giúp của các ví dụ. 1. dấu lại phần tử cụ thể và lưu nó dưới dạng PDF: Chúng tôi sẽ tạo ra một cửa sổ và lưu cái này dưới dạng PDF trong thời gian chạy. Điều này tương tự như các tính năng in mặc định của hệ thống. Các bước được thảo luận dưới đây. - Tạo một cửa sổ mới bằng phương thức ‘window.open.window.open‘ method.
- Viết InsideHtml cho thẻ của chúng tôi, bên trong cửa sổ đó.
- In cửa sổ
- Đóng cửa sổ
Ví dụ: Trong ví dụ này, chúng tôi sẽ sử dụng liên kết CDN HTML2PDF sẽ giúp tạo tệp PDF.In this example, we will use the html2pdf CDN link that will help to generate the pdf file. HTML<!DOCTYPE html>
< html lang = "en"
< Download 0>
Download 2< Download 4 Download 5=
Download 2Download 8Download 4>
Download 2< <!DOCTYPE html> 3>
<!DOCTYPE html> 5<!DOCTYPE html> 6
<!DOCTYPE html> 7<!DOCTYPE html> 8
<!DOCTYPE html> 7< 0
<!DOCTYPE html> 7< 2
<!DOCTYPE html> 7< 4
<!DOCTYPE html> 7< 6
<!DOCTYPE html> 7< 8
<!DOCTYPE html> 5html 0
<!DOCTYPE html> 5html 2
<!DOCTYPE html> 7html 4
<!DOCTYPE html> 7html 6
<!DOCTYPE html> 7html 8
<!DOCTYPE html> 7lang 0
<!DOCTYPE html> 7lang 2
<!DOCTYPE html> 7lang 4
<!DOCTYPE html> 7lang 6
<!DOCTYPE html> 5html 0
<!DOCTYPE html> 5= 0
<!DOCTYPE html> 7= 2
<!DOCTYPE html> 7= 4
<!DOCTYPE html> 7= 6
<!DOCTYPE html> 7= 8
<!DOCTYPE html> 7"en" 0
<!DOCTYPE html> 5html 0
<!DOCTYPE html> 5"en" 4
<!DOCTYPE html> 7"en" 6
<!DOCTYPE html> 7"en" 8
<!DOCTYPE html> 5html 0
Download 2Download 8<!DOCTYPE html> 3>
Download 8Download 0>
< > 9>
Download 2< < 3 < 4= < 6>
Các Các Download 35Download 58
<!DOCTYPE html> 7< Download 25>
Download 27< Download 29>
Download 31< Download 33>
Download 35Download 36
Download 35Download 38
Download 31Download 8Download 33>
Download 27Download 8Download 29>
Download 27< Download 29>
Download 31< Download 33>
Download 35Download 56
Download 35Download 58
Download 31Download 8Download 33>
Download 27Download 8Download 29>
<!DOCTYPE html> 7Download 8Download 25>
<!DOCTYPE html> 5Download 8< 3>
Download 2Download 8< 3>
Download 8> 9>
< Download 4>
Download 2Download 86
Download 2Download 88
Download 2Download 90
<!DOCTYPE html> 5Download 92
Download 27Download 94
<!DOCTYPE html> 5Download 96
<!DOCTYPE html> 5Download 98
<!DOCTYPE html> 5<!DOCTYPE html> 00
<!DOCTYPE html> 5<!DOCTYPE html> 02
<!DOCTYPE html> 5<!DOCTYPE html> 04
<!DOCTYPE html> 5<!DOCTYPE html> 06
Download 2<!DOCTYPE html> 08
Download 8Download 4>
Download 8html >
Output: 2. Sử dụng thư viện JSPDF: Để tạo PDF trong thời gian chạy, chúng tôi có thể sử dụng thư viện JSPDF. Các bước là: - Bao gồm CDN JSPDF trong thẻ trong tài liệu HTML. CDN được đưa ra dưới đây, tìm kiếm ‘JSPDF CDN tại Google cho phiên bản mới nhất.
- Tạo PDF từ HTML Div bằng phương thức ‘Fromhtml.
- Lưu tệp bằng phương thức Save () trong JavaScript.
Example: HTML<!DOCTYPE html>
< html >
< Download 0>
Download 2< <!DOCTYPE html> 24<!DOCTYPE html> 25<!DOCTYPE html> 24>
<!DOCTYPE html> 5< Download 4 Download 5=
<!DOCTYPE html> 5Download 8Download 4>
Download 2< <!DOCTYPE html> 3>
<!DOCTYPE html> 5<!DOCTYPE html> 6
<!DOCTYPE html> 7<!DOCTYPE html> 8
<!DOCTYPE html> 7< 0
<!DOCTYPE html> 7< 2
<!DOCTYPE html> 7< 4
<!DOCTYPE html> 7< 6
<!DOCTYPE html> 7< 8
<!DOCTYPE html> 5html 0
<!DOCTYPE html> 5<!DOCTYPE html> 58
<!DOCTYPE html> 7html 4
<!DOCTYPE html> 7html 6
<!DOCTYPE html> 7html 8
<!DOCTYPE html> 7lang 0
<!DOCTYPE html> 7lang 2
<!DOCTYPE html> 7lang 4
<!DOCTYPE html> 7lang 6
<!DOCTYPE html> 5html 0
<!DOCTYPE html> 5= 0
<!DOCTYPE html> 7= 2
<!DOCTYPE html> 7= 4
<!DOCTYPE html> 7= 6
<!DOCTYPE html> 7= 8
<!DOCTYPE html> 7"en" 0
<!DOCTYPE html> 5html 0
<!DOCTYPE html> 5"en" 4
<!DOCTYPE html> 7"en" 6
<!DOCTYPE html> 7"en" 8
<!DOCTYPE html> 5html 0
Download 2Download 8<!DOCTYPE html> 3>
Download 8Download 0>
< > 9>
Download 2< < 3 < 4= < 6>
Các <!DOCTYPE html> 5< < 3 Download 01= Download 15>
<!DOCTYPE html> 7< Download 19Download 20Download 19>
<!DOCTYPE html> 7< Download 25>
Download 27< Download 29>
Download 31< Download 33>
Download 35Download 36
Download 35Download 38
Download 31Download 8Download 33>
Download 27Download 8Download 29>
Download 27< Download 29>
Download 31< Download 33>
Download 35Download 56
Download 35Download 58
Download 31Download 8Download 33>
Download 27Download 8Download 29>
<!DOCTYPE html> 7Download 8Download 25>
<!DOCTYPE html> 5Download 8< 3>
Download 2Download 8< 3>
Download 2< Download 4>
<!DOCTYPE html> 5Download 86
<!DOCTYPE html> 5Download 90
<!DOCTYPE html> 7html 01
<!DOCTYPE html> 7html 03
<!DOCTYPE html> 7html 05
<!DOCTYPE html> 7html 07
<!DOCTYPE html> 7html 09
<!DOCTYPE html> 5<!DOCTYPE html> 08
Download 2Download 8Download 4>
Download 8> 9>
Download 8html >
Output: 3. Sử dụng thư viện HTML2PDF: Các bước để tạo tệp PDF bằng thư viện HTML2PDF là: - Bao gồm CDN HTML2PDF ở đầu tài liệu HTML. CDN được đưa ra dưới đây, tìm kiếm ‘HTML2PDF CDN, tại Google cho phiên bản mới nhất.
- Tạo PDF bằng cách sử dụng đối tượng HTML2PDF (). Đây là một đối tượng mặc định của thư viện HTML2PDF.
- Lưu PDF.
Example: HTML<!DOCTYPE html>
<!DOCTYPE html> 5< Download 4 Download 5=
<!DOCTYPE html> 7< 4
<!DOCTYPE html> 7"en" 8
Download 2Download 8Download 4>
Download 2< <!DOCTYPE html> 3>
<!DOCTYPE html> 5<!DOCTYPE html> 6
<!DOCTYPE html> 7<!DOCTYPE html> 8
<!DOCTYPE html> 7< 0
<!DOCTYPE html> 7< 2
<!DOCTYPE html> 7< 4
<!DOCTYPE html> 7< 6
<!DOCTYPE html> 7< 8
<!DOCTYPE html> 5html 0
<!DOCTYPE html> 5html 2
<!DOCTYPE html> 7html 4
<!DOCTYPE html> 7html 6
<!DOCTYPE html> 7html 8
<!DOCTYPE html> 7lang 0
<!DOCTYPE html> 7lang 2
<!DOCTYPE html> 7lang 4
<!DOCTYPE html> 7lang 6
Download 2< < 3 < 4= < 6>
<!DOCTYPE html> 5= 0
<!DOCTYPE html> 7= 2
<!DOCTYPE html> 7= 4
<!DOCTYPE html> 7= 6
<!DOCTYPE html> 7= 8
<!DOCTYPE html> 7"en" 0
<!DOCTYPE html> 5html 0
<!DOCTYPE html> 5"en" 4
<!DOCTYPE html> 7"en" 6
<!DOCTYPE html> 7"en" 8
<!DOCTYPE html> 5html 0
Download 2Download 8<!DOCTYPE html> 3>
Download 8Download 0>
< > 9>
Download 2< < 3 < 4= < 6>
Các <!DOCTYPE html> 5< < 3 Download 01= Download 15>
<!DOCTYPE html> 7< Download 19Download 20Download 19>
<!DOCTYPE html> 7< Download 25>
Download 27< Download 29>
Download 31< Download 33>
Download 35Download 36
Download 35Download 38
Download 31Download 8Download 33>
Download 27Download 8Download 29>
Download 27< Download 29>
Download 31< Download 33>
Download 35Download 56
Download 35Download 58
Download 31Download 8Download 33>
Download 27Download 8Download 29>
<!DOCTYPE html> 7Download 8Download 25>
<!DOCTYPE html> 5Download 8< 3>
Download 2Download 8< 3>
Download 2< Download 4>
<!DOCTYPE html> 5Download 86
<!DOCTYPE html> 5Download 88
<!DOCTYPE html> 5Download 90
<!DOCTYPE html> 7= 10
<!DOCTYPE html> 5<!DOCTYPE html> 08
Download 2Download 8Download 4>
Download 8> 9>
Download 8html >
Output: |