diff options
Diffstat (limited to 'vcl/source/pdf/PDFiumLibrary.cxx')
-rw-r--r-- | vcl/source/pdf/PDFiumLibrary.cxx | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/vcl/source/pdf/PDFiumLibrary.cxx b/vcl/source/pdf/PDFiumLibrary.cxx new file mode 100644 index 000000000000..5082c2567cce --- /dev/null +++ b/vcl/source/pdf/PDFiumLibrary.cxx @@ -0,0 +1,38 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + */ + +#include <config_features.h> + +#if HAVE_FEATURE_PDFIUM + +#include <vcl/filter/PDFiumLibrary.hxx> +#include <fpdf_doc.h> + +namespace vcl +{ +namespace pdf +{ +PDFium::PDFium() +{ + FPDF_LIBRARY_CONFIG aConfig; + aConfig.version = 2; + aConfig.m_pUserFontPaths = nullptr; + aConfig.m_pIsolate = nullptr; + aConfig.m_v8EmbedderSlot = 0; + FPDF_InitLibraryWithConfig(&aConfig); +} + +PDFium::~PDFium() { FPDF_DestroyLibrary(); } +} +} // end vcl::pdf + +#endif // HAVE_FEATURE_PDFIUM + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |