Installation
- 01Upload plugin folder to the /wp-content/plugins/ directory.
- 02Activate the plugin through the “Plugins” menu in WordPress.
- 03Go to “Settings” -> “POST2PDF Converter” to configure.
Change the default font
- 04Go to “Settings” -> “POST2PDF Converter” to configure.
- 05Enter new font name to “Font” and “Monospaced font” option in “PDF Settings” section.
- 06If you allow visitors who receive a PDF to make changes to it even if they don’t have the same font, disable “Font subsetting” option.
- 07If your font file is xxxx.z, font name is xxxx.
- 08Don’t apply a proportional font to “Monospaced font” option.
Fonts for Japanese
This plugin includes following Japanese fonts.
Font name: cid0jp, kozgopromedium, kozminproregular
This plugin can’t quite convert contents which include Japanese characters to PDF file using bundled fonts.
However, you can download better Japanese fonts and use them.
If your contents are written in Japanese, please install one of these fonts. You have only to upload font files without converting and configure some setting options.
TCPDF用日本語フォント
- 09Upload all *.php, *.z, *.ctg.z files to /wp-content/plugins/post2pdf-converter/tcpdf/fonts directory.
- 10Go to “Settings” -> “POST2PDF Converter” to configure.
- 11Enter font name to “Font” and “Monospaced font” option in “PDF Settings” section.
- 12If you allow visitors who receive a PDF to make changes to it even if they don’t have the same font, disable “Font subsetting” option.
- 13If your font file is xxxx.z, font name is xxxx.
- 14Don’t apply a proportional font to “Monospaced font” option.
You can also use following fonts.
日本語フリーFONT
If you want to use your own TrueType font, you can convert TrueType font to a font for TCPDF using “Font converter” in setting panel.
Fonts for Latin, Greek and Cyrillic
This plugin includes following Latin fonts.
Font name: courier, helvetica, times
You can also use following fonts. However, If you allow visitors who receive a PDF to make changes to it even if they don’t have the same font, you had better disable “Font subsetting” option.
Font name: pdfacourier, pdfahelvetica, pdfatimes
You can also use “FreeFont” or “DejaVu fonts”. However, If you allow visitors who receive a PDF to make changes to it even if they don’t have the same font, you had better disable “Font subsetting” option.
Fonts for Simplified Chinese
This plugin includes following Simplified Chinese fonts.
Font name: cid0cs, stsongstdlight
Fonts for Traditional Chinese
This plugin includes following Traditional Chinese fonts.
Font name: cid0ct, msungstdlight
Fonts for Korean
This plugin includes following Korean fonts.
Font name: cid0kr, hysmyeongjostdmedium
Fonts for Cyrillic
You can use “FreeFont” or “DejaVu fonts”. However, If you allow visitors who receive a PDF to make changes to it even if they don’t have the same font, you had better disable “Font subsetting” option.
Fonts for Arabic
This plugin includes following Arabic fonts.
Font name: aealarabiya, aefurat
You can also use “FreeFont”. However, If you allow visitors who receive a PDF to make changes to it even if they don’t have the same font, you had better disable “Font subsetting” option.
Fonts for Hebrew, Armenian, Georgian, Ethiopian and Thai
You can use “FreeFont”. However, If you allow visitors who receive a PDF to make changes to it even if they don’t have the same font, you had better disable “Font subsetting” option.
DejaVu fonts
This plugin inclues “DejaVu fonts”. However, If you allow visitors who receive a PDF to make changes to it even if they don’t have the same font, you had better disable “Font subsetting” option.
Font name: dejavusans, dejavusanscondensed, dejavusansextralight, dejavusansmono, dejavuserif, dejavuserifcondensed
Note: “dejavusansmono” is a monospaced font.
“DejaVu fonts” support Latin, Greek and Cyrillic characters.
FreeFont
This plugin inclues “FreeFont”. However, If you allow visitors who receive a PDF to make changes to it even if they don’t have the same font, you had better disable “Font subsetting” option.
Font name: freemono, freesans, freeserif
Note: “freemono” is a monospaced font.
“FreeFont” supports Latin, Greek, Cyrillic, Arabic, Hebrew, Armenian, Georgian, Ethiopian and Thai characters.
Add new fonts
You can add new fonts for TCPDF.
How to convert a font
Convert a TrueType font(*.ttf) to font files for TCPDF.
- 15Read TCPDF Fonts or Use “Font converter” in the setting panel.
You can download utilities to convert a font.
How to install a font
- 16Upload all *.php, *.z, *.ctg.z files to /wp-content/plugins/post2pdf-converter/tcpdf/fonts directory.
How to use the added font
- 17Go to “Settings” -> “POST2PDF Converter” to configure.
- 18Enter font name to “Font” and “Monospaced font” option in “PDF Settings” section.
- 19If you allow visitors who receive a PDF to make changes to it even if they don’t have the same font, disable “Font subsetting” option.
- 20If your font file is xxxx.z, font name is xxxx.
- 21Don’t apply a proportional font to “Monospaced font” option.
Safe fonts directory
After automatic updating, your added fonts will be removed.
If you enable “Safe fonts directory” option in the setting panel, your fonts will never be removed.
Before you enable “Safe fonts directory”, you must make /wp-content/tcpdf-fonts/ directory on your server manually. And upload/move bundled fonts and your fonts to new directory and enable “Safe fonts directory”.
Now you can remove original fonts directory.
- 22Bundled fonts: Unzip a plugin zip file and you can find orignal fonts in /post2pdf-converter/tcpdf/fonts .
- 23Original fonts directory: /YOUR PLUGIN DIRECTORY/post2pdf-converter/tcpdf/fonts ・You need not to upload all bundled fonts to new font directory. But you must upload helvetica.php, helveticab.php, helveticabi.php, helveticai.php to new font directory at least.
However, after automatic updating, fonts in the new directory will never be updated. You must maintain the new fonts directory by yourself.
Shortcode
You can insert the download link to your posts/pages using shortcode.
Note: Before you use shortcode, go to the setting panel and ebable “Shortcode” option.
[pdf]Click here to get a PDF[/pdf]
This plugin allows you to set some attributes.
[pdf id="1643" lang="jpn" file="id" font="cid0jp" monospaced="cid0jp" fontsize="11" subsetting="1" ratio="1.35" header="1" logo="1" logo_file="my_logo.png" logo_width="45" wrap_title="1" footer="1" filters="1" shortcode="parse" ffamily="0"]Click here to get a PDF[/pdf]
You can apply different font, image ratio, header logo on each posts/pages.
You can also make the download link for other posts/pages using “id” attribute.
Available attributes
- 24id: set post id by numbers. e.g. 1245
- 25lang: Set your language by language code. see “Available languages” below. e.g. eng
- 26file: Set filename type to title or id .
- 27font: Set default font by font name. e.g. helvetica
- 28monospaced: Set default monospaced font by font name. e.g. courier
- 29fontsize: Set font size by numbers. e.g. 12
- 30subsetting: Set to 1 or 0 to enable/disable Font subsetting.
- 31ratio: Set image ratio by numbers. e.g. 1.25
- 32header: Set to 1 or 0 to show/hide header.
- 33logo: Set to 1 or 0 to show/hide logo image.
- 34logo_file: Set logo file name. e.g. tcpdf_logo.jpg
- 35logo_width: Set logo width in millimeters. e.g. 30
- 36title: Set to 1 or 0 to show/hide title.
- 37wrap_title: Set to 1 or 0 . When set to 1 , long title will be wrapped.
- 38filters: Set to 1 or 0 . When set to 1 , WordPress default filtes will be applied to the title/content.
- 39footer: Set to 1 or 0 to show/hide footer.
- 40shortcode: Set to parse or remove to parse/remove shortcode.
- 41ffamily: If a PDF file has garbled characters, set to 1 .
Note: When id is omitted, current post id will be set to. When other attribures are omitted, current setting value will be set to.
Available languages
- 42afr: Afrikaans
- 43sqi: Albanian
- 44ara: Arabic
- 45aze: Azerbaijanian
- 46eus: Basque
- 47bel: Belarusian
- 48bra: Portuguese(Brazil)
- 49cat: Catalan
- 50chi: Chinese(Simplified)
- 51zho: Chinese(Traditional)
- 52hrv: Croatian
- 53ces: Czech
- 54dan: Danish
- 55nld: Dutch
- 56eng: English
- 57est: Estonian
- 58far: Farsi
- 59fra: French
- 60ger: German
- 61gle: Irish
- 62glg: Galician
- 63kat: Georgian
- 64hat: Haitian Creole
- 65heb: Hebrew
- 66hun: Hungarian
- 67hye: Armenian
- 68ind: Indonesian
- 69ita: Italian
- 70jpn: Japanese
- 71kor: Korean
- 72mkd: Macedonian
- 73msa: Malay
- 74mlt: Maltese
- 75ron2: Moldavian
- 76ron3: Moldovan
- 77nob: Norwegian Bokmål
- 78pol: Polish
- 79por: Portuguese
- 80ron1: Romanian
- 81rus: Russian