Skip to content

A fast, helpful, and open-source document parser

pdfium-sys: declare FPDF_ImportPagesByIndex for the static (wasm) bindings

Logan Markewich57dc6b2cb4e0
diff --git a/crates/pdfium-sys/bindings.rs b/crates/pdfium-sys/bindings.rs
index 97d0e16..21e91df 100644
--- a/crates/pdfium-sys/bindings.rs
+++ b/crates/pdfium-sys/bindings.rs
@@ -3305,3 +3305,12 @@ unsafe extern "C" {
pub fn FPDFPage_Flatten(page: FPDF_PAGE, nFlag: ::std::os::raw::c_int)
-> ::std::os::raw::c_int;
}
+unsafe extern "C" {
+ pub fn FPDF_ImportPagesByIndex(
+ dest_doc: FPDF_DOCUMENT,
+ src_doc: FPDF_DOCUMENT,
+ page_indices: *const ::std::os::raw::c_int,
+ length: ::std::os::raw::c_ulong,
+ index: ::std::os::raw::c_int,
+ ) -> FPDF_BOOL;
+}
diff --git a/crates/pdfium-sys/wrapper.h b/crates/pdfium-sys/wrapper.h
index 202f146..8ca1805 100644
--- a/crates/pdfium-sys/wrapper.h
+++ b/crates/pdfium-sys/wrapper.h
@@ -8,3 +8,4 @@
#include "fpdf_transformpage.h"
#include "fpdf_signature.h"
#include "fpdf_flatten.h"
+#include "fpdf_ppo.h"