src/reportlab/pdfbase/pdfpattern.py
branchpy33
changeset 3794 398ea04239b5
parent 3721 0c93dd8ff567
child 3800 e8547b00eb59
equal deleted inserted replaced
3793:cc3f9cc828f7 3794:398ea04239b5
     1 __doc__="""helper for importing pdf structures into a ReportLab generated document
     1 __doc__="""helper for importing pdf structures into a ReportLab generated document
     2 """
     2 """
     3 from reportlab.pdfbase.pdfdoc import format
     3 from reportlab.pdfbase.pdfdoc import format
     4 
       
     5 import string
       
     6 
       
     7 class PDFPattern:
     4 class PDFPattern:
     8     __PDFObject__ = True
     5     __PDFObject__ = True
     9     __RefOnly__ = 1
     6     __RefOnly__ = 1
    10     def __init__(self, pattern_sequence, **keywordargs):
     7     def __init__(self, pattern_sequence, **keywordargs):
    11         """
     8         """
    52                 if type(value) is InstanceType:
    49                 if type(value) is InstanceType:
    53                     #L.append( value.format(document) )
    50                     #L.append( value.format(document) )
    54                     L.append(format(value, document))
    51                     L.append(format(value, document))
    55                 else:
    52                 else:
    56                     L.append( str(value) )
    53                     L.append( str(value) )
    57         return string.join(L, "")
    54         return "".join(L)
    58 
    55 
    59 
    56