*/
int pdf_has_unsaved_changes(fz_context *ctx, pdf_document *doc);
+/*
+ Determine if this PDF has been repaired since opening.
+*/
+int pdf_was_repaired(fz_context *ctx, pdf_document *doc);
+
/* Object that can perform the cryptographic operation necessary for document signing */
typedef struct pdf_pkcs7_signer pdf_pkcs7_signer;
return pdf_has_unsaved_changes(ctx, pdf) ? JNI_TRUE : JNI_FALSE;
}
+JNIEXPORT jboolean JNICALL
+FUN(PDFDocument_wasRepaired)(JNIEnv *env, jobject self)
+{
+ fz_context *ctx = get_context(env);
+ pdf_document *pdf = from_PDFDocument(env, self);
+ if (!ctx || !pdf) return JNI_FALSE;
+ return pdf_was_repaired(ctx, pdf) ? JNI_TRUE : JNI_FALSE;
+}
+
JNIEXPORT jboolean JNICALL
FUN(PDFDocument_canBeSavedIncrementally)(JNIEnv *env, jobject self)
{
JNIEXPORT jboolean JNICALL Java_com_artifex_mupdf_fitz_PDFDocument_hasUnsavedChanges
(JNIEnv *, jobject);
+/*
+ * Class: com_artifex_mupdf_fitz_PDFDocument
+ * Method: wasRepaired
+ * Signature: ()Z
+ */
+JNIEXPORT jboolean JNICALL Java_com_artifex_mupdf_fitz_PDFDocument_wasRepaired
+ (JNIEnv *, jobject);
+
/*
* Class: com_artifex_mupdf_fitz_PDFDocument
* Method: canBeSavedIncrementally
public native PDFObject addCJKFont(Font font, int ordering, int wmode, boolean serif);
public native PDFObject addFont(Font font);
public native boolean hasUnsavedChanges();
+ public native boolean wasRepaired();
public native boolean canBeSavedIncrementally();
public native void save(String filename, String options);
return doc->dirty;
}
+int pdf_was_repaired(fz_context *ctx, pdf_document *doc)
+{
+ return doc->repair_attempted;
+}
+
int pdf_toggle_widget(fz_context *ctx, pdf_widget *widget)
{
switch (pdf_widget_type(ctx, widget))