You could use custom fonts to server your purpose:
For Arabic
: you can use trado.ttf
For Chinese
: you can use gkai00mp.ttf
Create a folder fonts in your '/app/assets/'
path and add it to your asset_path
by adding the below line in application.rb
,
config.assets.paths << Rails.root.join("app", "assets", "fonts")
And for generating the Arabic/Chinese content in PDF report, please do as below.
pdftable = Prawn::Document.new
if I18n.locale == :ar
#pdftable.font "#{Prawn::BASEDIR}/data/fonts/trado.ttf"
pdftable.font Rails.root.join('app', 'assets', 'fonts', 'trado.ttf')
pdftable.text_direction = :rtl
elsif I18n.locale == :zh
#pdftable.font "#{Prawn::BASEDIR}/data/fonts/gkai00mp.ttf"
pdftable.font Rails.root.join('app', 'assets', 'fonts', 'gkai00mp.ttf')
end
Hope you could generate reports in Arabic/Chinese languages.