add method to get document language (to GLib bindings)
This attached PDF document has value set in /Catalog /Lang
.
I need to read the document language in a similar way its title is read:
import sys
import os
import gi
gi.require_version('Poppler', '0.18')
from gi.repository import Poppler
gi.require_version('Gst', '1.0')
from gi.repository import Gst
Gst.init(sys.argv)
pdf = "testing-language.pdf"
uri = Gst.filename_to_uri(os.path.abspath(pdf))
doc = Poppler.Document.new_from_file(uri, None)
title = doc.get_title()
print(title)
I can get title, but there is no method for Poppler.Document.get_lang()
.
Would it be possible to have a poppler_document_get_lang ()
method added?
Many thanks for your help.