diff options
Diffstat (limited to 'libmat2/pdf.py')
| -rw-r--r-- | libmat2/pdf.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libmat2/pdf.py b/libmat2/pdf.py index c8769aa..140b4f4 100644 --- a/libmat2/pdf.py +++ b/libmat2/pdf.py | |||
| @@ -37,7 +37,12 @@ class PDFParser(abstract.AbstractParser): | |||
| 37 | except GLib.GError: # Invalid PDF | 37 | except GLib.GError: # Invalid PDF |
| 38 | raise ValueError | 38 | raise ValueError |
| 39 | 39 | ||
| 40 | def remove_all_lightweight(self): | 40 | def remove_all(self) -> bool: |
| 41 | if self.lightweight_cleaning is True: | ||
| 42 | return self.__remove_all_lightweight() | ||
| 43 | return self.__remove_all_thorough() | ||
| 44 | |||
| 45 | def __remove_all_lightweight(self) -> bool: | ||
| 41 | """ | 46 | """ |
| 42 | Load the document into Poppler, render pages on a new PDFSurface. | 47 | Load the document into Poppler, render pages on a new PDFSurface. |
| 43 | """ | 48 | """ |
| @@ -64,7 +69,7 @@ class PDFParser(abstract.AbstractParser): | |||
| 64 | 69 | ||
| 65 | return True | 70 | return True |
| 66 | 71 | ||
| 67 | def remove_all(self): | 72 | def __remove_all_thorough(self) -> bool: |
| 68 | """ | 73 | """ |
| 69 | Load the document into Poppler, render pages on PNG, | 74 | Load the document into Poppler, render pages on PNG, |
| 70 | and shove those PNG into a new PDF. | 75 | and shove those PNG into a new PDF. |
