DinkToPdf
DinkToPdf copied to clipboard
Multi language characters are not supported
I am trying to generate the PDF from the HTML content, content has some different languages characters while I am trying to generate the PDF it will not generating the PDF properly and showing some unsupported characters,
Facing this issue with docker, in local system it's working fine. I have added following packages in docker,
FROM microsoft/dotnet:2.1-runtime RUN apt-get update && apt-get install -y libgdiplus openssl libssl1.0 zlib1g fontconfig wkhtmltopdf libfreetype6 libx11-6 libxext6 libxrender1
Let me know If I miss something ?
See the example to generate the PDF for below request and see the attached response file.
string html = "<div>会意字 / 會意字 huìyìzì શ્ઢ શ્ણ શ્ત શ્થ શ્દ શ્ધ શ્ન શ્પ શ્ફ શ્બ શ્ભ શ્મ શ્ય શ્ર શ્લ શ્ળ શ્વ શ્શ શ્ષ શ્સ ષ ષ્ક ષ્ખ ષ્ગ ષ્ઘ ષ્ઙ ષ્ચ ષ્છ ષ્જ ષ્ઝ ષ્ઞ ષ્ટ ષ્ઠ ષ્હસ સ્ક સ્ખ સ્ગ સ્ઘ સ્ઙ સ્ચ સ્છ સ્જ સ્ઝ સ્ઞ સ્ટ સ્ઠ સ્ડ સ્ઢ સ્ણ સ્ત સ્થ સ્દ સ્ધ સ્ન સ્પ સ્ફ સ્બ સ્ભ સ્મ સ્ય સ્ર સ </div>"
var doc = new HtmlToPdfDocument { GlobalSettings = { ColorMode = ColorMode.Color, Orientation = Orientation.Portrait, PaperSize = PaperKind.A4, Margins = new MarginSettings { Top = 10 } }, Objects = { new ObjectSettings { HtmlContent = html, WebSettings = { DefaultEncoding = "utf-8" } } } };