Add unsaved changes prompts
This commit is contained in:
@@ -62,6 +62,7 @@ def main() -> int:
|
||||
|
||||
document = PdfDocument()
|
||||
document.open(source_pdf)
|
||||
assert not document.is_dirty
|
||||
assert document.render_page(0, 1.0).width() > 0
|
||||
assert document.render_page(0, 1.0).width() > 0
|
||||
assert document.search("feature")
|
||||
@@ -74,6 +75,7 @@ def main() -> int:
|
||||
assert document.strikeout_text(0, "feature") == 1
|
||||
|
||||
document.add_note(0, "note")
|
||||
assert document.is_dirty
|
||||
annotations = document.annotations()
|
||||
assert annotations
|
||||
assert document.delete_annotation(annotations[0].page_index, annotations[0].xref)
|
||||
@@ -118,6 +120,7 @@ def main() -> int:
|
||||
allow_modify=False,
|
||||
)
|
||||
document.save()
|
||||
assert not document.is_dirty
|
||||
document.close()
|
||||
|
||||
encrypted_document = PdfDocument()
|
||||
|
||||
Reference in New Issue
Block a user