--- pdf/pdf_file.c.org	2022-02-23 02:15:51 +0000
+++ pdf/pdf_file.c	2022-02-23 02:22:26 +0000
@@ -53,8 +53,8 @@
 #  include "sjpx_luratech.h"
 #elif defined(USE_OPENJPEG_JP2)
 #  include "sjpx_openjpeg.h"
-#else
-#  include "sjpx.h"
+
+
 #endif
 
 static void pdfi_close_filter_chain(pdf_context *ctx, stream *s, stream *target);
@@ -434,7 +434,7 @@
     }
     return 0;
 }
-
+#if defined(USE_LWF_JP2) || defined(USE_OPENJPEG_JP2)
 /*
  * dict -- the dict that contained the decoder (i.e. the image dict)
  * decode -- the decoder dict
@@ -559,7 +559,7 @@
 
     return 0;
 }
-
+#endif
 private_st_jpeg_decompress_data();
 
 static int PDF_DCTD_PassThrough(void *d, byte *Buffer, int Size)
@@ -809,11 +809,12 @@
         code = pdfi_DCT_filter(ctx, dict, decode, source, new_stream);
         return code;
     }
+ #if defined(USE_LWF_JP2) || defined(USE_OPENJPEG_JP2)
     if (pdfi_name_is(n, "JPXDecode")) {
         code = pdfi_JPX_filter(ctx, dict, decode, source, new_stream);
         return code;
     }
-
+  #endif
     if (pdfi_name_is(n, "AHx")) {
         if (!inline_image) {
             pdfi_set_warning(ctx, 0, NULL, W_PDF_BAD_INLINEFILTER, "pdfi_apply_filter", NULL);
