Skip to content

Commit

Permalink
guard pdf2htmlex use in http server
Browse files Browse the repository at this point in the history
  • Loading branch information
andiwand committed Jan 9, 2025
1 parent f2bc58e commit a400075
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/odr/http_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class HttpServer::Impl {
auto document = document_file.document();
html_service = internal::html::create_document_service(
document, output_path, config);
#ifdef ODR_WITH_PDF2HTMLEX
} else if (file.is_pdf_file()) {
PdfFile pdf_file = file.pdf_file();
if (pdf_file.password_encrypted()) {
Expand All @@ -83,6 +84,7 @@ class HttpServer::Impl {
html_service = internal::html::create_poppler_pdf_service(
dynamic_cast<const internal::PopplerPdfFile &>(*pdf_file.impl()),
output_path, config);
#endif
} else {
throw std::runtime_error("Unsupported file type");
}
Expand Down

0 comments on commit a400075

Please sign in to comment.