Thanks for this plugin.
I just installed it, when I try to get a pdf file from the post content it not recognize Arabic characters, is there a problem with unicode ? Screenshot here
Same problem on both Windows 7 and Ubuntu 12.04
Have you set UTF-8 fonts in the admin panel? Helvetica, which is a core font, is not UTF-8 compatible. Try one of the DejaVu Sans fonts for header, body, and footer or perhaps Arial Unicode.
This is mentioned in the FAQ.
If that still does not resolve the issue, please advise. If it does resolve it, then please mark this issue as resolved.
Thanks for your prompt response.
Yes, all fonts are set to Arial, I tried different ones but the problem persists.
I misspoke. Arial Unicode is no longer bundled with the TCPDF class. Arial is just a synonym for Helvetica, so that won’t get us very far (I’ll correct the FAQ).
Please test with DejaVu Sans and let me know.
A link to the live site (I don’t have any Arabic writing at hand) would be helpful, too, in case DejaVu Sans doesn’t address the problem.
Sorry for the confusion!
FYI, here are the current font mappings in the plugin:
Al Arabiya => aealarabiya
Furat => aefurat
Arial => helvetica
Arial Bold => helveticab
Arial Bold Italic => helveticabi
Arial Italic => helveticai
Courier => courier
Courier Bold => courierb
Courier Bold Italic => courierbi
Courier Italic => courieri
DejaVu Sans => dejavusans
DejaVu Sans Bold => dejavusansb
DejaVu Sans Bold Italic => dejavusansbi
DejaVu Sans Condensed => dejavusanscondensed
DejaVu Sans Condensed Bold => dejavusanscondensedb
DejaVu Sans Condensed Bold Italic => dejavusanscondensedbi
DejaVu Sans Condensed Italic => dejavusanscondensedi
DejaVu Sans Extra Light => dejavusansextralight
DejaVu Sans Italic => dejavusansi
DejaVu Sans Mono => dejavusansmono
DejaVu Sans Mono Bold => dejavusansmonob
DejaVu Sans Mono Bold Italic => dejavusansmonobi
DejaVu Sans Mono Italic => dejavusansmonoi
DejaVu Serif => dejavuserif
DejaVu Serif Bold => dejavuserifb
DejaVu Serif Bold Italic => dejavuserifbi
DejaVu Serif Condensed => dejavuserifcondensed
DejaVu Serif Condensed Bold => dejavuserifcondensedb
DejaVu Serif Condensed Bold Italic => dejavuserifcondensedbi
DejaVu Serif Condensed Italic => dejavuserifcondensedi
DejaVu Serif Italic => dejavuserifi
Free Mono => freemono
Free Mono Bold => freemonob
Free Mono Bold Italic => freemonobi
Free Mono Italic => freemonoi
Free Sans => freesans
Free Sans Bold => freesansb
Free Sans Bold Italic => freesansbi
Free Sans Italic => freesansi
Free Serif => freeserif
Free Serif Bold => freeserifb
Free Serif Bold Italic => freeserifbi
Free Serif Italic => freeserifi
Helvetica => helvetica
Helvetica Bold => helveticab
Helvetica Bold Italic => helveticabi
Helvetica Italic => helveticai
Kozuka Gothic Pro (Japanese Sans-Serif) => kozgopromedium
Kozuka Mincho Pro (Japanese Serif) => kozminproregular
MSung Light (Trad. Chinese) => msungstdlight
MyungJo Medium (Korean) => hysmyeongjostdmedium
PDF/A Courier => pdfacourier
PDF/A Courier Bold => pdfacourierb
PDF/A Courier Bold Italic => pdfacourierbi
PDF/A Courier Italic => pdfacourieri
PDF/A Helvetica => pdfahelvetica
PDF/A Helvetica Bold => pdfahelveticab
PDF/A Helvetica Bold Italic => pdfahelveticabi
PDF/A Helvetica Italic => pdfahelveticai
PDF/A Symbol => pdfasymbol
PDF/A Times Roman => pdfatimes
PDF/A Times Bold => pdfatimesb
PDF/A Times Bold Italic => pdfatimesbi
PDF/A Times Italic => pdfatimesi
PDF/A ZapfDingbats => pdfazapfdingbats
STSong Light (Simp. Chinese) => stsongstdlight
Symbol => symbol
Times Roman => times
Times Bold => timesb
Times Bold Italic => timesbi
Times Italic => timesi
ZapfDingbats => zapfdingbats
Thanks a lot for having time responding my question.
I got it worked with DejaVu Sans.
Still another problem. When the text contains both rtl and ltr in the same paragraph, it doesn’t appear in the right order.
Glad the font change was the answer. 🙂
As for the “embedded” LTR text, we’ll need to use a shortcode to insert a TCPDF command here to temporarily shift us out of RTL mode for the string you want the opposite direction.
I will implement this is in the next (hopefully) development build as two formats:
[wpptopdfenh_rtl]with a closing tag as a quick, easier-to-remember shortcode to switch whatever text comes between the codes to LTR or RTL; and
[wpptopdfenh_tcpdf options=]as a way of inserting TCPDF options directly into the content. This will allow for adding all sorts of commands to be sent to the PDF renderer but keep them hidden from the HTML view.
Give me a little time to work these out, and I’ll follow up when at least the first one is in place.
I think it would be a nice thing if you could add the pot file in the plugin folders. I’ll be happy to translate it to Arabic and/or French.
Internationalization is on the roadmap. I want to get the rest of the feature set more compete first, though.
Thanks for your kind offer to translate, too! I will definitely keep in touch as we get closer to doing this.
I spent some time last night with the TCPDF setRTL method and getting the shortcode to work for that, but haven’t quite hit on it, yet. Just wanted you to know that I am indeed serious about making this RTL/LTR thing happen!
- The topic ‘Problem outputting arabic content’ is closed to new replies.