pypdflite/pdfdocument.py
def add_text(self, text, cursor=None, justification=None):
        """ Input text, short or long. Writes in order, within the defined page boundaries. Sequential add_text commands will print without
            additional whitespace. """
        if cursor is None:
            cursor = self.page.cursor

        text = re.sub("\s\s+" , " ", text)

        if justification is None:
            justification = self.justification

        if '\n' in text:
            text_list = text.split('\n')
            for text in text_list:
                PDFText(self.session, self.page, text, self.font, self.text_color, cursor, justification, self.double_spacing)
                self.add_newline()
        else:
            PDFText(self.session, self.page, text, self.font, self.text_color, cursor, justification, self.double_spacing)
def add_text(self, text, cursor=None, justification=None):
        if cursor is None:
            cursor = self.page.cursor

        text = re.sub("\s\s+" , " ", text)

        if justification is None:
            justification = self.justification

        if '\n' in text:
            text_list = text.split('\n')
            for text in text_list:
                PDFText(self.session, self.page, text, self.font, self.text_color, cursor, justification, self.double_spacing)
                self.add_newline()
        else:
            PDFText(self.session, self.page, text, self.font, self.text_color, cursor, justification, self.double_spacing)
def add_text ( self , text , cursor = None , justification = None ) : if cursor is None : cursor = self . page . cursor text = re . sub ( "\s\s+" , " " , text ) if justification is None : justification = self . justification if '\n' in text : text_list = text . split ( '\n' ) for text in text_list : PDFText ( self . session , self . page , text , self . font , self . text_color , cursor , justification , self . double_spacing ) self . add_newline ( ) else : PDFText ( self . session , self . page , text , self . font , self . text_color , cursor , justification , self . double_spacing )
Input text, short or long. Writes in order, within the defined page boundaries. Sequential add_text commands will print without
            additional whitespace.
Input text short or long . Writes in order within the defined page boundaries . Sequential add_text commands will print without additional whitespace .