How to use the paperwork-backend.paperwork_backend.common.page.PageExporter function in paperwork-backend

To help you get started, we’ve selected a few paperwork-backend examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github openpaperwork / paperwork / paperwork-backend / paperwork_backend / common / page.py View on Github external
def __init__(self, doc, page_nb):
        """
        Don't create directly. Please use ImgDoc.get_page()
        """
        self.fs = doc.fs
        self.doc = doc
        self.page_nb = page_nb

        assert(self.page_nb >= 0)
        self.__prototype_exporters = {
            'PNG': PageExporter(self, 'PNG', 'image/png', ["png"]),
            'JPEG': PageExporter(self, 'JPEG', 'image/jpeg', ["jpeg", "jpg"]),
        }
github openpaperwork / paperwork / paperwork-backend / paperwork_backend / common / page.py View on Github external
def __init__(self, doc, page_nb):
        """
        Don't create directly. Please use ImgDoc.get_page()
        """
        self.fs = doc.fs
        self.doc = doc
        self.page_nb = page_nb

        assert(self.page_nb >= 0)
        self.__prototype_exporters = {
            'PNG': PageExporter(self, 'PNG', 'image/png', ["png"]),
            'JPEG': PageExporter(self, 'JPEG', 'image/jpeg', ["jpeg", "jpg"]),
        }
github openpaperwork / paperwork / paperwork-backend / paperwork_backend / common / page.py View on Github external
def __copy__(self):
        return PageExporter(self.page, self.img_format, self.mime,
                            self.valid_exts)