mPDF is a PHP library which generates PDF files from UTF-8 encoded HTML.
A translator to convert normal text to fancy text which you can copy and paste. Well, the answer is actually no - rather than generating fancy fonts, this converter.
It is based on FPDF and HTML2FPDF(see CREDITS), with a number of enhancements. mPDF was written by Ian Back and is releasedunder the GNU GPL v2 licence.
Note: If you are viewing this file on mPDF GitHub repository homepage or on Packagist, please note thatthe default repository branch is
development
which can differ from the last stable release.mPDF 7+ requires PHP
^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0
. PHP mbstring
and gd
extensions have to be loaded.Additional extensions may be required for some advanced features such as
zlib
for compression of output andembedded resources such as fonts, bcmath
for generating barcodes or xml
for character set conversionand SVG handling.mPDF has some problems with fetching external HTTP resources with single threaded servers such as
php -S
. A properserver such as nginx (php-fpm) or Apache is recommended.Consider supporting development of mPDF with a donation of any value. Donation button can be found on themain page of the documentation.
Official installation method is via composer and its packagist package mpdf/mpdf.
The simplest usage (since version 7.0) of the library would be as follows:
This will output the PDF inline to the browser as
application/pdf
Content-type.All configuration directives canbe set by the
$config
parameter of the constructor.It is recommended to set one's own temporary directory via
tempDir
configuration variable.The directory must have write permissions (mode 775
is recommended) for users using mPDF(typically cli
, webserver
, fpm
).Warning: mPDF will clean up old temporary files in the temporary directory. Choose a path dedicated to mPDF only.
By default, the temporary directory will be inside vendor directory and will have correct permissions from
post_install
composer script.For more information about custom temporary directory see the note onFolder for temporary filesin the section on Installation & Setup in the manual.
If you have problems, please read the section ontroubleshooting in the manual.
Online manual is available at https://mpdf.github.io/.
For general questions or troubleshooting please use the mpdf tag at Stack Overflow (and not the project's issue tracker).
Please read before submitting issues and pull requests the CONTRIBUTING.md file.
Unit testing for mPDF is done using PHPUnit.
To get started, run
composer install
from the command line while in the mPDF root directory(you'll need composer installed first).To execute tests, run
vendor/bin/phpunit
from the command line while in the mPDF root directory.Any assistance writing unit tests for mPDF is greatly appreciated. If you'd like to help, pleasenote that any PHP file located in the
/tests/
directory will be autoloaded when unit testing.You might have noticed that some users on Twitter are able to change the font of their tweets. How do they do this? Are they sorcerers? As it turns out, they're not. They just know a few little Unicode secrets that allow them to seemingly make their tweet font bold, italic, or just completely different.
The secret is quite simple. Unicode specifies a huge number of characters (over 100,000). So the characters that are on your keyboard are really only a very small fraction of the possible characters that can be rendered by most computers and devices. Amongst these 100k+ characters are alphabets, like the one on your keyboard, but bolder or more italic or ???????-er or with different character spacing or ????????. There are a huge variety of fonts that you can use on twitter - these are only the beginning of what Unicode grants us.
Simply type your normal Tweet text in the first box and the generator will convert it into a bunch of different fonts which you can copy and paste into your Tweets, or in your Twitter bio, and just about anywhere else on the internet.
There are dozens of different twitter fonts that you can generate with this page. Here are a few examples:
- ??????? ?????
- ??????? ?????
- ?? тᗯ????ᖇ ᖴㄖℕ丅? ✎?
- ??????? ?????
- ??????? ?????
- ??????? ?????
- twitter fonts
- ? ⋆ ? ? ??????? ????? ? ? ⋆ ?
- ᴛᴡɪᴛᴛᴇʀ ꜰᴏɴᴛꜱ
- sʇuoɟ ɹǝʇʇıʍʇ
Please enable JavaScript to view comments
LingoJam © 2019 Home | Terms & Privacy