Ejemplo n.º 1
0
def test():
    doc = Document()
    section = Section('Multirow Test')
    figure = Figure()
    image_filename = os.path.join(os.path.dirname(__file__),
                                  '../examples/kitten.jpg')
    figure.add_image(image_filename)
    figure.add_caption('Whoooo an imagage of a pdf')
    section.append(figure)
    doc.append(section)

    doc.generate_pdf()
Ejemplo n.º 2
0
 def addFigure(self,file=None,caption=None,width='240px'):
     graph = Figure(position='h!')
     graph.add_image(file, width=width)
     if caption is not None:
         graph.add_caption(caption)
     self.content.append(graph)