Python PDF generator


Youtube Live session on Tkinter

from reportlab.lib.units import inch
def my_temp(c):
    c.translate(inch,inch)
# define a large font
    c.setFont("Helvetica", 14)
# choose some colors
    c.setStrokeColorRGB(0.1,0.8,0.1)
    c.setFillColorRGB(0,0,1) # font colour
    c.drawImage('D:\\top2.jpg',-0.9*inch,2.6*inch) #change path
    #####
    c.rotate(35)
    c.setFillColorCMYK(0,0,0,0.08) # font colour
    c.setFont("Helvetica", 100)
    c.drawString(-1.1*inch, -0.5*inch, "SAMPLE") # watermarking
    c.rotate(-35)
    #####
    c.setFillColorRGB(1,0,0)
    c.setFont("Helvetica", 25)
    c.drawRightString(1.7*inch,2.3*inch,'Identity Card')
    c.setFillColorRGB(0,0,0)
    c.setFont("Helvetica", 24)
    c.drawRightString(0.3*inch,1.7*inch,'ID:')
    c.drawRightString(0.3*inch,1.3*inch,'Name:')
    c.drawRightString(0.3*inch,0.9*inch,'Class:')
    c.drawRightString(0.3*inch,0.5*inch,'Gender:')
    c.drawRightString(4.0*inch,-0.5*inch,'Signature')
    c.line(-1.1,-0.7*inch,5*inch,-0.7*inch)
    c.setFont("Helvetica",8)
    c.setFillColorRGB(1,0,0) # font colour
    c.drawString(0, -0.9*inch, u"\u00A9"+" plus2net.com")
    
    return c
PDF Mark sheet by using data from SQLite database Generate PDF Invoice using Sales data Table from different data sources to PDF file Table from Pandas DataFrame to PDF file PDF Circles & Shapes
Create Report in PDF using Charts, images, tables and Paragraphs
Bar charts in PDF Line charts in PDF Pie Charts Paragraph
Python

Subscribe to our YouTube Channel here


Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com



    Post your comments , suggestion , error , requirements etc here





    Python Video Tutorials
    Python SQLite Video Tutorials
    Python MySQL Video Tutorials
    Python Tkinter Video Tutorials
    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer