內容簡介
總結:
- "HTML to PDF Converter" WordPress 外掛由 html2pdf.app 開發,提供了一種簡單的方式將任何 WordPress 網頁或文章轉換為 PDF 檔案。
- 只需安裝外掛,設定 API 金鑰和轉換設定,然後使用短代碼 [html2pdf text="儲存為 PDF"] 將 PDF 轉換連結新增至網站上的任何頁面或文章。
問題與答案:
問:如何設定「HTML to PDF Converter」外掛?
答:前往「設定 -> HTML to PDF」頁面,輸入你的 html2pdf.app API 金鑰。你可以在 https://dash.html2pdf.app/registration 註冊帳號以取得 API 金鑰。
問:我可以自訂 PDF 轉換設定嗎?
答:是的,你可以自訂 PDF 轉換設定,包括格式、方向(豎式或橫式)、邊界和自訂頁面大小。
問:如何使用短代碼來顯示 PDF 轉換連結?
答:只需在任何頁面或文章中新增以下短代碼:[html2pdf text="儲存為 PDF"]
外掛標籤
開發者團隊
原文外掛簡介
The “HTML to PDF Converter” WordPress plugin created by html2pdf.app, provides an easy way to convert any WordPress page or post to a PDF file. Simply install the plugin, configure your API key and conversion settings, and use the shortcode [html2pdf text="Save as PDF"] to add a PDF conversion link to any page or post on your site.
Plugin Settings
To configure the plugin, go to the “Settings -> HTML to PDF” page and enter your html2pdf.app API key. You can get the API key by registering an account on https://dash.html2pdf.app/registration.
You can also customize the PDF conversion settings, including the format, orientation (portrait or landscape), margins, and custom page size.
Usage
To display the PDF conversion link using the shortcode, simply add the following shortcode to any page or post: [html2pdf text="Save as PDF"]
Examples
Use “media” parameter to activate special styles for printing: [html2pdf text="Save as PDF" media="print"].
CSS example to show only relevant part of the web page:
@media print {
/* Hide everything */
* {
visibility: hidden;
margin: 0;
padding: 0;
}
/* Make only your desired content visible */
.your-visible-content * {
visibility: visible;
}
/* Optionally hide the conversion link from the PDF */
.html2pdf_button {
visibility: hidden!important;
}
}
