I tried insert russian text in PDF file and I see that, what am I doing wrong?
import fitz
if __name__ == '__main__':
src_pdf_filename = 'original.pdf'
dst_pdf_filename = 'destination.pdf'
document = fitz.open(src_pdf_filename)
ss = u"ToUnicode Привет Hello"
for page in document:
page.insert_text((50, 250), ss, fontname="Times-Roman", fontsize=50,encoding=fitz.TEXT_ENCODING_CYRILLIC, overlay=False)
document.save(dst_pdf_filename)
document.close()

if __name__ == '__main__':should be trivial; the purpose of this boilerplate is to allow you to import the code, which you will not want to do anyway if the logic you need is not available via import. See also stackoverflow.com/a/69778466/874188)