summaryrefslogtreecommitdiff
path: root/vcl/source/pdf
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-10-08 21:04:07 +0200
committerMiklos Vajna <vmiklos@collabora.com>2020-10-09 09:03:59 +0200
commit4777f5a0512655552c8803a7378926ad7c02da71 (patch)
treebf86aa413d420fd5daa45bad8f6f4fd5b8ea3edd /vcl/source/pdf
parentd73776daa4a0e9397a9b86b5a250b210062fd760 (diff)
vcl: PDFiumLibrary: add PDFiumDocument::getFileVersion()
Allows not exposing the underlying FPDF_DOCUMENT in PDFiumDocument. Change-Id: Icff455af406405aff9099e950c26ce824517b57a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104097 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'vcl/source/pdf')
-rw-r--r--vcl/source/pdf/PDFiumLibrary.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/vcl/source/pdf/PDFiumLibrary.cxx b/vcl/source/pdf/PDFiumLibrary.cxx
index d790fb1b9c01..a0668d0c6048 100644
--- a/vcl/source/pdf/PDFiumLibrary.cxx
+++ b/vcl/source/pdf/PDFiumLibrary.cxx
@@ -174,6 +174,13 @@ basegfx::B2DSize PDFiumDocument::getPageSize(int nIndex)
int PDFiumDocument::getPageCount() { return FPDF_GetPageCount(mpPdfDocument); }
+int PDFiumDocument::getFileVersion()
+{
+ int nFileVersion = 0;
+ FPDF_GetFileVersion(mpPdfDocument, &nFileVersion);
+ return nFileVersion;
+}
+
int PDFiumPage::getObjectCount() { return FPDFPage_CountObjects(mpPage); }
std::unique_ptr<PDFiumPageObject> PDFiumPage::getObject(int nIndex)