Skip to content

Commit

Permalink
added edit_text function
Browse files Browse the repository at this point in the history
first call the edit_text function then the generate_pdf function.
example:
edit_text("red",22,"Helvetica")
generate_pdf("hello world")
  • Loading branch information
Pkpratik authored Nov 4, 2019
1 parent e87f79f commit c2f584a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pdf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
from reportlab.pdfgen import canvas
c=canvas.Canvas("report.pdf")
def generate_pdf(text):
c=canvas.Canvas("report.pdf")
c.drawString(0,830,text)
c.drawString(0,800,text)
c.save()
def edit_text(color,size,font_name):
c.setFillColor(color)
c.setFont(font_name, size, leading = None)

0 comments on commit c2f584a

Please sign in to comment.