Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ jobs:
-DCMAKE_CXX_FLAGS="-Werror"
-DCMAKE_INSTALL_PREFIX=install
-DODR_TEST=ON
-DODR_WITH_PDF2HTMLEX=ON
-DODR_WITH_WVWARE=ON
-DODR_WITH_LIBMAGIC=ON
-DODR_BUNDLE_ASSETS=ON
${{ matrix.bindings && '-DODR_JNI=ON -DODR_PYTHON=ON' || '' }}
Expand All @@ -137,8 +135,6 @@ jobs:
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=install
-DODR_TEST=ON
-DODR_WITH_PDF2HTMLEX=OFF
-DODR_WITH_WVWARE=OFF
-DODR_WITH_LIBMAGIC=OFF

- name: build
Expand Down Expand Up @@ -240,7 +236,9 @@ jobs:
fail-fast: false
matrix:
include:
# fails at the moment because of pdf2htmlex
# Disabled while pdf2htmlEX was still built; that blocker is gone, but
# the reference output is generated on macOS, so re-enabling needs a
# cross-platform comparison run first.
#- { os: ubuntu-24.04, host_profile: ubuntu-24.04-clang-18 }
#- { os: ubuntu-24.04, host_profile: ubuntu-24.04-gcc-14 }
- { os: macos-26, host_profile: macos-26-armv8-clang-14 }
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ jobs:
# everything that needs the wheel's own, reduced dependency set.
wheels:
runs-on: ${{ matrix.os }}
# Builds the reduced dependency set that `pyproject.toml` pins (no
# pdf2htmlEX/wvWare), so it cannot share a cache with `build_test`.
# Builds the wheel-specific configuration that `pyproject.toml` pins
# (static, no cli/tests, bundled assets), so it cannot share a cache with
# `build_test`.
env:
CACHE_FLAVOR: wheel
strategy:
Expand Down Expand Up @@ -104,16 +105,13 @@ jobs:
restore-keys: |
ccache-${{ env.CACHE_FLAVOR }}-${{ matrix.host_profile }}-${{ env.CCACHE_KEY_SUFFIX }}-

# Match the dependency set that pyproject.toml enables. pdf2htmlEX and
# wvWare stay off (their runtime data cannot ship inside the wheel);
# libmagic stays on and `bundle_assets` bridges its database path into the
# build so `magic.mgc` lands in `pyodr/data`.
# Match the dependency set that pyproject.toml enables. libmagic stays on
# and `bundle_assets` bridges its database path into the build so
# `magic.mgc` lands in `pyodr/data`.
- name: conan install
run: >
conan install .
-o '&:with_python=True'
-o '&:with_pdf2htmlEX=False'
-o '&:with_wvWare=False'
-o '&:bundle_assets=True'
--profile:host '${{ matrix.host_profile }}'
--profile:build '${{ matrix.build_profile }}'
Expand Down
9 changes: 4 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ bytes ─▶ magic/open_strategy ─▶ DecodedFile ─▶ Document ─▶ Eleme
| `src/odr/internal/odf/` | OpenDocument (odt/ods/odp/odg); see [`odf/AGENTS.md`](src/odr/internal/odf/AGENTS.md). |
| `src/odr/internal/ooxml/` | OOXML (docx/pptx/xlsx); see [`ooxml/AGENTS.md`](src/odr/internal/ooxml/AGENTS.md) + per-format docs. |
| `src/odr/internal/oldms/` | **Legacy MS binary** (.doc/.ppt/.xls). |
| `src/odr/internal/oldms_wvware/` | Alternative .doc decoder via wvWare. |
| `src/odr/internal/pdf/`, `pdf_poppler/` | PDF (own parser + poppler/pdf2htmlEX path). |
| `src/odr/internal/pdf/` | PDF (own parser). |
| `src/odr/internal/{csv,json,text,svm}/` | Smaller formats. |
| `cli/src/` | CLI tools: `translate`, `back_translate`, `meta`, `server`. |
| `python/` | Python bindings (`pyodr`, pybind11); see [`python/AGENTS.md`](python/AGENTS.md). |
Expand All @@ -86,9 +85,9 @@ cmake --build cmake-build-relwithdebinfo --target translate # CLI: file → HTM
when really necessary.
- **Run the test binary from the build dir** so output stays out of the repo tree.
- **For debugging, prefer the `translate` CLI** on a single file over the suite.
- CMake options (`CMakeLists.txt`): `ODR_TEST`, `ODR_CLI`, `ODR_WITH_PDF2HTMLEX`,
`ODR_WITH_WVWARE`, `ODR_WITH_LIBMAGIC`, `ODR_PYTHON`, `ODR_CLANG_TIDY`. A new
`.cpp` must be added to `ODR_SOURCE_FILES`.
- CMake options (`CMakeLists.txt`): `ODR_TEST`, `ODR_CLI`, `ODR_WITH_LIBMAGIC`,
`ODR_PYTHON`, `ODR_CLANG_TIDY`. A new `.cpp` must be added to
`ODR_SOURCE_FILES`.
- **Test data lives in git submodules** under `test/data/`.

## Conventions
Expand Down
70 changes: 2 additions & 68 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,7 @@ option(ODR_TEST "enable tests" OFF)
option(ODR_CLI "enable command line interface" ON)
option(ODR_WITH_HTTP_SERVER "Build the HTTP server (requires cpp-httplib)" ON)
option(ODR_CLANG_TIDY "Run clang-tidy static analysis" OFF)
option(WITH_PDF2HTMLEX "Deprecated: `ODR_WITH_PDF2HTMLEX` instead! Build with pdf2htmlEX" ON)
option(WITH_WVWARE "Deprecated: `ODR_WITH_WVWARE` instead! Build with wvWare" ON)
option(WITH_LIBMAGIC "Deprecated: `ODR_WITH_WVWARE` instead! Build with libmagic" ON)
option(ODR_WITH_PDF2HTMLEX "Build with pdf2htmlEX" "${WITH_PDF2HTMLEX}")
option(ODR_WITH_WVWARE "Build with wvWare" "${WITH_WVWARE}")
option(ODR_WITH_LIBMAGIC "Build with libmagic" "${WITH_LIBMAGIC}")
option(ODR_WITH_LIBMAGIC "Build with libmagic" ON)
option(ODR_BUNDLE_ASSETS "Bundle assets during build and install" OFF)
option(ODR_PYTHON "Build Python bindings" OFF)
option(ODR_JNI "Build JNI bindings" OFF)
Expand Down Expand Up @@ -135,7 +130,6 @@ set(ODR_SOURCE_FILES
"src/odr/internal/html/html_writer.cpp"
"src/odr/internal/html/image_file.cpp"
"src/odr/internal/html/pdf_file.cpp"
"src/odr/internal/html/pdf2htmlex_wrapper.hpp"
"src/odr/internal/html/text_file.cpp"

"src/odr/internal/json/json_file.cpp"
Expand Down Expand Up @@ -270,7 +264,7 @@ set(ODR_INSTALL_ODR_DATA_PATH "${CMAKE_INSTALL_DATADIR}")

# Validate an injected data-file path before it is used to bundle assets.
#
# These paths (FONTCONFIG_DATA_PATH, POPPLER_DATA_PATH, ...) are consumed but
# These paths (LIBMAGIC_DATABASE_PATH, ...) are consumed but
# never discovered by CMake — they must be injected from outside via `-D...=`;
# our conanfile.py bridges them from the dependency runenv. A consumer that
# builds odrcore without that bridge left the variable empty, and
Expand Down Expand Up @@ -307,66 +301,6 @@ if (ODR_WITH_HTTP_SERVER)
ODR_WITH_HTTP_SERVER
)
endif ()
if (ODR_WITH_PDF2HTMLEX)
find_package(pdf2htmlEX REQUIRED)
find_package(poppler REQUIRED)
target_sources(odr
PRIVATE
"src/odr/internal/html/pdf2htmlex_wrapper.cpp"
"src/odr/internal/pdf_poppler/poppler_pdf_file.cpp"
)
target_link_libraries(odr
PRIVATE
pdf2htmlex::pdf2htmlex
poppler::poppler
)
target_compile_definitions(odr
PRIVATE
ODR_WITH_PDF2HTMLEX
)

if (ODR_BUNDLE_ASSETS)
odr_require_data_path("${FONTCONFIG_DATA_PATH}" FONTCONFIG_DATA_PATH)
odr_require_data_path("${POPPLER_DATA_PATH}" POPPLER_DATA_PATH)
odr_require_data_path("${PDF2HTMLEX_DATA_PATH}" PDF2HTMLEX_DATA_PATH)

set(ODR_BUILD_FONTCONFIG_DATA_PATH "${ODR_BUILD_ODR_DATA_PATH}/fontconfig")
set(ODR_BUILD_POPPLER_DATA_PATH "${ODR_BUILD_ODR_DATA_PATH}/poppler")
set(ODR_BUILD_PDF2HTMLEX_DATA_PATH "${ODR_BUILD_ODR_DATA_PATH}/pdf2htmlex")

file(COPY "${FONTCONFIG_DATA_PATH}/" DESTINATION "${ODR_BUILD_FONTCONFIG_DATA_PATH}")
file(COPY "${POPPLER_DATA_PATH}/" DESTINATION "${ODR_BUILD_POPPLER_DATA_PATH}")
file(COPY "${PDF2HTMLEX_DATA_PATH}/" DESTINATION "${ODR_BUILD_PDF2HTMLEX_DATA_PATH}")

set(ODR_INSTALL_FONTCONFIG_DATA_PATH "${ODR_INSTALL_ODR_DATA_PATH}/fontconfig")
set(ODR_INSTALL_POPPLER_DATA_PATH "${ODR_INSTALL_ODR_DATA_PATH}/poppler")
set(ODR_INSTALL_PDF2HTMLEX_DATA_PATH "${ODR_INSTALL_ODR_DATA_PATH}/pdf2htmlex")
else ()
set(ODR_BUILD_FONTCONFIG_DATA_PATH "${FONTCONFIG_DATA_PATH}")
set(ODR_BUILD_POPPLER_DATA_PATH "${POPPLER_DATA_PATH}")
set(ODR_BUILD_PDF2HTMLEX_DATA_PATH "${PDF2HTMLEX_DATA_PATH}")

set(ODR_INSTALL_FONTCONFIG_DATA_PATH "${FONTCONFIG_DATA_PATH}")
set(ODR_INSTALL_POPPLER_DATA_PATH "${POPPLER_DATA_PATH}")
set(ODR_INSTALL_PDF2HTMLEX_DATA_PATH "${PDF2HTMLEX_DATA_PATH}")
endif ()
endif ()
if (ODR_WITH_WVWARE)
find_package(wvware REQUIRED)
target_sources(odr
PRIVATE
"src/odr/internal/html/wvware_wrapper.cpp"
"src/odr/internal/oldms_wvware/wvware_oldms_file.cpp"
)
target_link_libraries(odr
PRIVATE
wvware::wvware
)
target_compile_definitions(odr
PRIVATE
ODR_WITH_WVWARE
)
endif ()
if (ODR_WITH_LIBMAGIC)
find_package(libmagic REQUIRED)
target_sources(odr
Expand Down
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,6 @@ Scripts and Docker images can be found here https://github.com/opendocument-app/
OpenDocument.core is licensed under the [Mozilla Public License 2.0](LICENSE)
(`MPL-2.0`).

Optional build features link the library against third-party components under
their own terms — notably `pdf2htmlEX` (`ODR_WITH_PDF2HTMLEX`) and `wvWare`
(`ODR_WITH_WVWARE`), both GPL-licensed. Enabling them and distributing the
combined binary may subject the whole to those components' license terms; consult
each project's own license before redistributing.

Separately, the committed PDF font/encoding tables in `src/odr/internal/pdf/` are
The committed PDF font/encoding tables in `src/odr/internal/pdf/` are
generated from third-party source data whose provenance and terms are documented
in [`tools/pdf/THIRD_PARTY_LICENSES.md`](tools/pdf/THIRD_PARTY_LICENSES.md).
2 changes: 0 additions & 2 deletions cli/src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ int main(const int argc, char **argv) {
}

DecodePreference decode_preference;
decode_preference.engine_priority = {
DecoderEngine::poppler, DecoderEngine::wvware, DecoderEngine::odr};
decode_preference.as_file_type = FileType::zip;

DecodedFile decoded_file{input, decode_preference, *logger};
Expand Down
45 changes: 0 additions & 45 deletions conan.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,73 +4,28 @@
"zstd/1.5.7#b68ca8e3de04ba5957761751d1d661f4%1760955092.069",
"zlib/1.3.2#1cb806da49011867778ffb6ac7190fcb%1777558780.503",
"xz_utils/5.8.3#a8432fead347c69d8b2737c35f936132%1775752656.4",
"wvware/1.2.9-odr#ecdcc87eeee4ba3171fc52b885ffcd37%1784987064.234467",
"vincentlaucsb-csv-parser/2.3.0#ac67e368e82c9e3da4a663c35e3a1b2f%1718528275.177",
"util-linux-libuuid/2.41.2#ee8e33ba15c17c0140643e0bd93c0b6f%1765881086.29",
"utfcpp/4.0.9#b5eb56fe6b829b6f3eb8da167c4f41b2%1773905531.586",
"uchardet/0.0.8#6ab25e452021fcdb560f4e37f4a27bc1%1759735438.978",
"pybind11/2.13.6#42746850cd4c68d1b1ea42de456c2182%1755673714.548",
"pugixml/1.15#979e88f4fafbfe3585d2c0510a071cc7%1739435725.483",
"poppler-data/0.4.12-odr#06cdb12e4cab52261a5eb6c7d7dad273%1784987064.081555",
"poppler/26.05.0-odr#1bea719ddff7adcea402ab5cc230cddb%1784987063.93038",
"pixman/0.46.2#88b157b4faa6474a6028c2ba2a987924%1752742515.414",
"pdf2htmlex/0.18.8.rc1-odr-git-732fd68#3740316d902d99246da134b0d5f97276%1784987063.4659111",
"pcre2/10.42#9a35f5089feb875ec61a38eca364ce77%1743524593.693",
"openjpeg/2.5.4#372fbc2b4348d45ab0c0a62a8475dc2f%1760446899.685",
"nlohmann_json/3.12.0#2d634ab0ec8d9f56353e5ccef6d6612c%1744735883.94",
"miniz/3.0.2#bfbce07c6654293cce27ee24129d2df7%1743673472.805",
"lzo/2.10#f00b10acc508cea70645727d970a23e1%1759909644.842",
"libxml2/2.12.7#1c4d20b7ab8b618ce699733723ba4df6%1721306327.767",
"libselinux/3.6#5a78ff6ae5034eeaac8da723361a8ce4%1717655459.344",
"libpng/1.6.58#19cb72905ae54f54948401f753faa2c1%1776606503.628",
"libmagic/5.45#791d5bad38d33272bb120994a198b1ac%1727273086.09",
"libjpeg/9f#8b1b89da851ad9172565c35f14e23c4c%1780476337.068",
"libiconv/1.17#9923bc6dc6f106646d6967e0039a5ada%1774021608.288",
"libgsf/1.14.52#5dbc15a9ac6f146fa648766f8691256e%1784987058.932805",
"libgettext/0.22#b09eea019e19b9b9c46d8f1da7d75444%1765809130.834",
"libffi/3.4.8#a045c00fb26779635e3bed40e80c5254%1753360042.396",
"libelf/0.8.13#ba59bbc89757ed62cfd7690a73bf81be%1741781951.327",
"lcms/2.17#3feb06eea368c52c82f50107cd7694cd%1753693316.094",
"gtest/1.14.0#f8f0757a574a8dd747d16af62d6eb1b7%1743410807.169",
"glib/2.81.0-odr#0436d4fbe7682722ede5964a63953c1d%1784987058.779003",
"giflib/5.2.2#b445ec67bae61a96ddf0fa5614afde18%1773315754.794",
"freetype/2.14.1#40f1e4af5db7d8155f9ecabd09973280%1762374429.281",
"fontforge/20251009#846770e19fc4ee3234e0a39344a71211%1784987058.624506",
"fontconfig/2.15.0-odr#5681bcb942193569ee95215b93ed9fb0%1784987058.316003",
"expat/2.8.1#e2fa0a1a12da326521a3d622a475047a%1780484982.662",
"cryptopp/8.9.0#7a51e0038756b21bc3a6b82d681d5906%1758206597.119",
"cpp-httplib/0.16.3#7aa89fbb81ffd19539a49fc132502966%1748426320.106",
"cairo/1.18.0-odr#e2979af10b4da6ece999e32d272ffabc%1784987058.1596658",
"bzip2/1.0.8#c470882369c2d95c5c77e970c0c7e321%1762886692.465",
"brotli/1.1.0#3f631ef77008f7b5eb388780116371a3%1764862343.045",
"boost/1.90.0#ddd0d973741acbebe7c3b8dfbfd005eb%1778050994.937",
"argon2/20190702-odr#965901884bc82ec8a7c0a1305d42c127%1784987057.981858"
],
"build_requires": [
"zstd/1.5.7#b68ca8e3de04ba5957761751d1d661f4%1760955092.069",
"zlib/1.3.2#1cb806da49011867778ffb6ac7190fcb%1777558780.503",
"xz_utils/5.8.3#a8432fead347c69d8b2737c35f936132%1775752656.4",
"pkgconf/2.5.1#93c2051284cba1279494a43a4fcfeae2%1757684701.089",
"pkgconf/2.2.0#4ac315b50ef734072b00ff3aacbf52bf%1755505628.021",
"pkgconf/2.1.0#21f96520faf7660b99f872e956d2ac13%1755505630.82",
"pcre2/10.42#9a35f5089feb875ec61a38eca364ce77%1743524593.693",
"ninja/1.13.2#c8c5dc2a52ed6e4e42a66d75b4717ceb%1764096931.974",
"meson/1.10.2#9d2d10681fe7fe61c788c58626c89b25%1775558003.754",
"meson/1.9.1#abbc783cd297bedce14581b4aec060b8%1758626166.349",
"m4/1.4.19#34c4bbc3eeebe98ca6edf2f52d602e7d%1777282960.259",
"libtool/2.4.7#14e7739cc128bc1623d2ed318008e47e%1755679003.847",
"libselinux/3.6#5a78ff6ae5034eeaac8da723361a8ce4%1717655459.344",
"libmagic/5.45#791d5bad38d33272bb120994a198b1ac%1727273086.09",
"libiconv/1.17#9923bc6dc6f106646d6967e0039a5ada%1774021608.288",
"libgettext/0.22#b09eea019e19b9b9c46d8f1da7d75444%1765809130.834",
"libffi/3.4.8#a045c00fb26779635e3bed40e80c5254%1753360042.396",
"libelf/0.8.13#ba59bbc89757ed62cfd7690a73bf81be%1741781951.327",
"gtk-doc-stub/cci.20181216#09072d684ce1458596b44a30a747494c%1687277608.37",
"gperf/3.1#a7afdf8f7cccdc2dcd4d962370c33d4f%1755780571.156",
"gnu-config/cci.20210814#466e9d4d7779e1c142443f7ea44b4284%1762363589.329",
"glib/2.81.0-odr#0436d4fbe7682722ede5964a63953c1d%1784987058.779003",
"gettext/0.26#28c867efd4914f03c6c05da08a23c35b%1765299118.633",
"flex/2.6.4#efa781fc5088b47c895bd4eef6911f2e%1761560242.855",
"cmake/4.3.2#5bae0b181463ca4dc3e924a981367ee6%1779785720.872",
"cmake/3.31.12#173a926abc2b77f03c826b6fd6539426%1779785723.158",
"bzip2/1.0.8#c470882369c2d95c5c77e970c0c7e321%1762886692.465",
Expand Down
17 changes: 1 addition & 16 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ class OpenDocumentCoreConan(ConanFile):
options = {
"shared": [True, False],
"fPIC": [True, False],
"with_pdf2htmlEX": [True, False],
"with_wvWare": [True, False],
"with_libmagic": [True, False],
"with_http_server": [True, False],
"with_cli": [True, False],
Expand All @@ -29,8 +27,6 @@ class OpenDocumentCoreConan(ConanFile):
default_options = {
"shared": False,
"fPIC": True,
"with_pdf2htmlEX": True,
"with_wvWare": True,
"with_libmagic": True,
"with_http_server": True,
"with_cli": True,
Expand All @@ -44,8 +40,6 @@ class OpenDocumentCoreConan(ConanFile):
def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
del self.options.with_pdf2htmlEX
del self.options.with_wvWare
del self.options.with_libmagic

def requirements(self):
Expand All @@ -56,10 +50,6 @@ def requirements(self):
self.requires("vincentlaucsb-csv-parser/2.3.0")
self.requires("uchardet/0.0.8")
self.requires("utfcpp/4.0.9")
if self.options.get_safe("with_pdf2htmlEX", False):
self.requires("pdf2htmlex/0.18.8.rc1-odr-git-732fd68")
if self.options.get_safe("with_wvWare", False):
self.requires("wvware/1.2.9-odr")
if self.options.get_safe("with_http_server", False):
self.requires("cpp-httplib/0.16.3")
self.requires("argon2/20190702-odr")
Expand All @@ -83,8 +73,6 @@ def generate(self):
tc = CMakeToolchain(self)
tc.variables["CMAKE_PROJECT_VERSION"] = self.version
tc.variables["ODR_TEST"] = False
tc.variables["ODR_WITH_PDF2HTMLEX"] = self.options.get_safe("with_pdf2htmlEX", False)
tc.variables["ODR_WITH_WVWARE"] = self.options.get_safe("with_wvWare", False)
tc.variables["ODR_WITH_LIBMAGIC"] = self.options.get_safe("with_libmagic", False)
tc.variables["ODR_WITH_HTTP_SERVER"] = self.options.get_safe("with_http_server", False)
tc.variables["ODR_CLI"] = self.options.get_safe("with_cli", True)
Expand All @@ -93,14 +81,11 @@ def generate(self):
tc.variables["ODR_BUNDLE_ASSETS"] = self.options.get_safe("bundle_assets", False)

# Get runenv info, exported by package_info() of dependencies
# We need to obtain PDF2HTMLEX_DATA_DIR, POPPLER_DATA_DIR, FONTCONFIG_PATH and WVDATADIR
# We need to obtain MAGIC
runenv_info = Environment()
for dep in self.dependencies.host.topological_sort.values():
runenv_info.compose_env(dep.runenv_info)
envvars = runenv_info.vars(self)
tc.variables["FONTCONFIG_DATA_PATH"] = envvars.get("FONTCONFIG_PATH")
tc.variables["POPPLER_DATA_PATH"] = envvars.get("POPPLER_DATA_DIR")
tc.variables["PDF2HTMLEX_DATA_PATH"] = envvars.get("PDF2HTMLEX_DATA_DIR")
tc.variables["LIBMAGIC_DATABASE_PATH"] = envvars.get("MAGIC")

tc.generate()
Expand Down
2 changes: 0 additions & 2 deletions docs/design/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
Eases lifetime management; consistent with value semantics for the user-facing API.
- Collapse `FileMeta` into a single type. The nested `DocumentMeta`
does not earn the extra indirection.
- drop `wvWare` (the alternative `.doc` decoder, `oldms_wvware/`)
- drop `pdf2htmlEX` (the poppler/pdf2htmlEX PDF path)

### Document index

Expand Down
3 changes: 1 addition & 2 deletions jni/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ standalone against an installed `odrcore` package.
Rendering uses shipped assets (CSS/JS). Point the library at them via
`GlobalParams.setOdrCoreDataPath(...)` or the `ODR_CORE_DATA_PATH` environment
variable (the tests read it; for in-tree builds it is `build/data`). The
optional pdf2htmlEX/wvWare/libmagic backends have their own paths on
`GlobalParams`.
optional libmagic backend has its own path on `GlobalParams`.

## Notes

Expand Down
2 changes: 1 addition & 1 deletion jni/java/app/opendocument/core/DecoderEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/** Mirrors {@code odr::DecoderEngine}; constant order must match the C++ declaration. */
public enum DecoderEngine {
ODR, POPPLER, WVWARE;
ODR;

static DecoderEngine fromNative(int code) {
return code < 0 ? null : values()[code];
Expand Down
12 changes: 0 additions & 12 deletions jni/java/app/opendocument/core/GlobalParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,10 @@ public final class GlobalParams {

public static native String odrCoreDataPath();

public static native String fontconfigDataPath();

public static native String popplerDataPath();

public static native String pdf2htmlexDataPath();

public static native String libmagicDatabasePath();

public static native void setOdrCoreDataPath(String path);

public static native void setFontconfigDataPath(String path);

public static native void setPopplerDataPath(String path);

public static native void setPdf2htmlexDataPath(String path);

public static native void setLibmagicDatabasePath(String path);

private GlobalParams() {}
Expand Down
Loading
Loading