Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(3)  |  Derive(0)  |  Import(1)

            def pdfdocEnc(x):
        return x.encode('extpdfdoc') if isinstance(x,unicode) else x
        


src/r/e/reportlab-3.1.8/src/reportlab/pdfbase/pdfpattern.py   reportlab(Download)
__doc__="""helper for importing pdf structures into a ReportLab generated document
"""
from reportlab.pdfbase.pdfdoc import format, PDFObject, pdfdocEnc
from reportlab.lib.utils import strTypes
class PDFPattern(PDFObject):
        for x in self.pattern:
            if isinstance(x,strTypes):
                L.append(pdfdocEnc(x))
            elif isinstance(x,PDFObject):
                L.append(x.format(document))
                    L.append(format(value,document))
                elif isinstance(value,strTypes):
                    L.append(pdfdocEnc(value))
                else:
                    L.append(pdfdocEnc(str(value)))