[WordPress] 外掛分享: PDF or image generator

WordPress 外掛 PDF or image generator 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「PDF or image generator」是 2017-09-15 上架。 目前已經下架不再更新,不建議安裝使用。
  • 目前有 10 個安裝啟用數。
  • 上一次更新是 2017-11-14,距離現在已有 2728 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 4.0 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 5.5 以上。
  • 尚未有人給過這款外掛評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

wposmosys | prasanna03 | priyankaac | sampathkumar0019 | siddhartha-osmosys |

外掛標籤

converter | html to pdf | html to image | pdf converter | image converter |

內容簡介

此外掛提供以下功能:

將網頁內容、HTML 字串或檔案轉換為圖像。
將網頁內容、HTML 字串或檔案轉換為 PDF。

開始使用
配置

透過設定選單或插件名稱下的設定連結,進入插件設定頁面。
從這裡下載 wkhtmltox。
執行可執行檔,然後它將創建wkhtmltox資料夾。輸入 wkhtmltox->bin 檔案內文件的絕對路徑。

使用

我們需要使用以下帶有指定參數的函數,它將返回生成的 PDF/圖像路徑。

PDFIG_generate($src, $src_type, $dest_file_name, $conversion_type);

$src 為必填參數,預期為字串。例如:“http://osmosys.asia”,“home/osmosys/test.php” 等。
$src_type 為必填參數,預期為字串。它指定源類型是什麼,可能是指定的 3 個值之一。可能的值:“TEMPLATE_PATH”,“HTML_STRING”,“URL”。
$dest_file_name 為選填參數,預期為字串。它是要下載的檔案。例如:“test”等。
$conversion_type 為選填參數,預期為字串。它指定要將給定的源轉換為哪種格式,可能是指定的 2 個值之一。可能的值:“PDF”,“IMG”。

只需在 demo 頁面中插入以下簡碼 [PDFIG_generator_demo]。

原文外掛簡介

It provides the following functionalities

Converting webpage content, HTML string or file into image.
Converting webpage content, HTML string or file into PDF.

Getting Started
Configuration

Go to plugin settings page through settings menu or settings link under plugin name in the plugins page.
Download wkhtmltox from here.
Run that executable file then it will create wkhtmltox folder. Enter the absolute path of the files inside wkhtmltox->bin files.

Usage

We have to call the following function with specified paramters and it will return the generated PDF/image path.
PDFIG_generate($src, $src_type, $dest_file_name, $conversion_type);

$src is required, expected string. Ex: “http://osmosys.asia”, “home/osmosys/test.php” etc.
$src_type is required, expected string. It specifies what is the source type, It can be one of the 3 values which are specified in the possible values. Possible values: “TEMPLATE_PATH”, “HTML_STRING”, “URL”.
$dest_file_name is optional, expected string. It is the file with which file will get downloaded. Ex: “test” etc.
$conversion_type is optional, expected string. It specifies to which format we have to convert the given source, it can be one among the 2 values which are specified in the possible values. Possible values: “PDF”, “IMG”.

Simply insert the following shortcode [PDFIG_generator_demo] for a demo page.

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「PDF or image generator」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


最新版本

延伸相關外掛(你可能也想知道)

  • JK Html To Pdf 》這是一個 WordPress 外掛,使用 Wkhtmltopdf 將 HTML 內容轉換為 PDF 檔案。。
  • Flexible PDF 》這個外掛是針對外掛或主題開發者所設計的。外掛提供一個功能:fpdf_create_pdf ($html)。, 此功能將任何 HTML 內容轉換為 PDF 文件。它期望一個參數 ($html)...。
  • GrabzIt Web Capture 》使用簡單的短代碼,即可截取網頁截圖或將任何文本或 HTML 片段轉換為圖像、PDF、DOCX、動畫 GIF、CSV、JSON 等格式! 開始使用:啟用 GrabzIt 網頁截取外掛,...。

文章
Filter
Apply Filters
Mastodon