update some minor fixes

This commit is contained in:
saqib mir
2026-06-03 10:51:33 +05:30
parent dc6e538c81
commit 0862afa1ce
14 changed files with 1405 additions and 14 deletions
+3
View File
@@ -141,6 +141,9 @@ PYBIND11_MODULE(pdfengine, m) {
.def("get_fonts", [](const pdfengine::PdfPage& self) {
return get_or_throw(self.getFonts());
})
.def("get_glyph_width", [](const pdfengine::PdfPage& self, const std::string& fontName, uint32_t charcode, double fontSize) {
return get_or_throw(self.getGlyphWidth(fontName, charcode, fontSize));
}, py::arg("font_name"), py::arg("charcode"), py::arg("font_size"))
.def("page_to_device", &pdfengine::PdfPage::pageToDevice,
py::arg("page_point"), py::arg("device_width"), py::arg("device_height"), py::arg("rotate") = 0)
.def("device_to_page", &pdfengine::PdfPage::deviceToPage,