diff options
Diffstat (limited to 'paper2remarkable/providers/_base.py')
| -rw-r--r-- | paper2remarkable/providers/_base.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/paper2remarkable/providers/_base.py b/paper2remarkable/providers/_base.py index 53ad78e..20349c2 100644 --- a/paper2remarkable/providers/_base.py +++ b/paper2remarkable/providers/_base.py @@ -122,16 +122,11 @@ class Provider(metaclass=abc.ABCMeta): [self.pdftk_path, in_pdf, "output", out_pdf, "compress"] ) elif self.pdftool == "qpdf": - # TODO: the status == 3 is only needed because when we remove - # the arXiv stamp we don't fix the length of the pdf object. This - # causes qpdf to raise a warning and give a nonzero exit status. - # Fixing the pdf object is the right approach, but this does - # work as it is since qpdf fixes the file for us. status = subprocess.call( [self.qpdf_path, "--stream-data=compress", in_pdf, out_pdf,], stderr=subprocess.DEVNULL, ) - if not (status == 0 or status == 3): + if not status == 0: raise _CalledProcessError( "%s failed to compress the PDF file." % self.pdftool ) |
