Skip to content

Instantly share code, notes, and snippets.

@u0d7i
Created September 1, 2015 13:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save u0d7i/0077525bdbdf18167d81 to your computer and use it in GitHub Desktop.
Save u0d7i/0077525bdbdf18167d81 to your computer and use it in GitHub Desktop.
$ cd $MYWBDIR
$ dpkg -L php-tcpdf | grep fonts
$ cp /usr/share/php/tcpdf/fonts/dejavusans* ./inc/3rdparty/libraries/tcpdf/fonts/
$ cp ./inc/poche/WallabagEBooks.class.php ./inc/poche/WallabagEBooks.class.php.dist
$ vi ./inc/poche/WallabagEBooks.class.php
$ diff -u ./inc/poche/WallabagEBooks.class.php.dist ./inc/poche/WallabagEBooks.class.php
--- ./inc/poche/WallabagEBooks.class.php.dist 2015-09-01 16:11:24.975564486 +0300
+++ ./inc/poche/WallabagEBooks.class.php 2015-09-01 16:17:12.891562800 +0300
@@ -226,6 +226,8 @@
@define ('K_TCPDF_THROW_EXCEPTION_ERROR', TRUE);
try {
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
+ // try to fix unicode font problem
+ $pdf->SetFont('dejavusans');
Tools::logm('Filling metadata for PDF...');
$pdf->SetCreator(PDF_CREATOR);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment