Re: utf-8 characters in provided examples do not work.(only [] or ? are displayed for the utf-8 characters)

151 views
Skip to first unread message

BrianS

unread,
Feb 27, 2013, 1:04:28 PM2/27/13
to dom...@googlegroups.com
Not all characters are supported by all variants of the DejaVu fonts included with dompdf and used to enable a basic level of Unicode character support. For some of the samples we used DejaVu Sans Mono, and the specific formatting of the elements causes the oblique (italics) version to be used. Unfortunately, the oblique version only supports a subset of the characters supported in the normal font variant. If you add the following styling to the sample document the characters should show up correctly: * { font-style: normal; }


On Wednesday, February 27, 2013 9:33:20 AM UTC-5, Sameer Shelavale wrote:
hello friends,
I tried installing the nightly build as well as release build(0.6) on WAMP(Windows) and LAMP(ubuntu) as well.

But the UTF-8 characters(Arabic and Indic and many others) in dompdf examples (encoding_utf-8.html) do not show up.
only [] or ? are displayed

I have installed the php-font-lib, imagick and everything specified in the guide to enabling Unicode support in DOMPDF
1. I have installed version 0.6.0
2. MBString is enabled
3. php-font-lib is installed in dompdf/lib/ folder
4. Imagick is installed
5. APC is installed
6. DOMPDF_UNICODE_ENABLED is set to true

Still the UTF-8 charachers in the examples are displaying as ? or []. Can anyone please tell me what I am missing?
(I suppose I dont need to install any fonts for the provided example to work, but I tried those examples with Arial unicode font that I uploaded and still it didnt work.)

here is the configuration

System Configuration


Required Present
PHP Version 5.0 5.3.10-1ubuntu3.5
DOMDocument extension Yes 20031129
PCRE Yes Yes
Zlib Yes 1.1
MBString extension Yes Yes
GD Yes Yes
APC For better performances 3.1.7
GMagick or IMagick Better with transparent PNG images IMagick 3.1.0RC1

DOMPDF Configuration

Config name Value Description Status
DOMPDF_DIR '/var/www/dompdf' Root directory of DOMPDF Readable
DOMPDF_INC_DIR '/var/www/dompdf/include' Include directory of DOMPDF Readable
DOMPDF_LIB_DIR '/var/www/dompdf/lib' Third-party libraries directory of DOMPDF Readable
DOMPDF_ADMIN_USERNAME ****** The username required to access restricted sections
DOMPDF_ADMIN_PASSWORD ****** The password required to access restricted sections OK
DOMPDF_FONT_DIR '/var/www/dompdf/lib/fonts/' Additional fonts directory Readable
DOMPDF_FONT_CACHE '/var/www/dompdf/lib/fonts/' Font metrics cache Writable
DOMPDF_TEMP_DIR '/tmp' Temporary folder Writable
DOMPDF_CHROOT '/var/www/dompdf' Restricted path Readable
DOMPDF_UNICODE_ENABLED true Unicode support (thanks to additionnal fonts)
DOMPDF_ENABLE_FONTSUBSETTING false Enable font subsetting, will make smaller documents when using Unicode fonts
DOMPDF_PDF_BACKEND 'CPDF' Backend library that makes the outputted file (PDF, image)
DOMPDF_DEFAULT_MEDIA_TYPE 'screen' Default media type (print, screen, ...)
DOMPDF_DEFAULT_PAPER_SIZE 'letter' Default paper size (A4, letter, ...)
DOMPDF_DEFAULT_FONT 'serif' Default font, used if the specified font in the CSS stylesheet was not found
DOMPDF_DPI 96 DPI scale of the document
DOMPDF_ENABLE_PHP false Inline PHP support
DOMPDF_ENABLE_JAVASCRIPT true Inline JavaScript support
DOMPDF_ENABLE_REMOTE false Allow remote stylesheets and images allow_url_fopen enabled
DOMPDF_LOG_OUTPUT_FILE '/var/www/dompdf/lib/fonts/log.htm' The file in which dompdf will write warnings and messages Writable
DOMPDF_FONT_HEIGHT_RATIO 1.1 The line height ratio to apply to get a render like web browsers
DOMPDF_ENABLE_CSS_FLOAT false Enable CSS float support (experimental)
DOMPDF_AUTOLOAD_PREPEND false Prepend the dompdf autoload function to the SPL autoload functions already registered instead of appending it
DOMPDF_ENABLE_HTML5PARSER false Enable the HTML5 parser (experimental)
DEBUGPNG false Debug PNG images
DEBUGKEEPTEMP false Keep temporary image files
DEBUGCSS false Debug CSS
DEBUG_LAYOUT false Debug layout
DEBUG_LAYOUT_LINES true Debug text lines layout
DEBUG_LAYOUT_BLOCKS true Debug block elements layout
DEBUG_LAYOUT_INLINE true Debug inline elements layout
DEBUG_LAYOUT_PADDINGBOX true Debug padding boxes layout

Reply all
Reply to author
Forward
0 new messages