certificados.py 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. # -*- coding: utf-8 -*-
  2. import PIL
  3. from PIL import ImageFont
  4. from PIL import Image
  5. from PIL import ImageDraw
  6. font = ImageFont.truetype("/usr/share/fonts/TTF/DejaVuSans-Bold.ttf",120)
  7. #font1 = ImageFont.truetype("/usr/share/fonts/TTF/DejaVuSans.ttf",80)
  8. # 3,508x2,480
  9. height = 3508
  10. width = 2480
  11. #text=" Participou da 3° Conferência Potiguar de Software Livre, PotiCon,\nrealizado no dia 24 Novembro de 2018, no Sebrae - Natal/RN, com carga\nhorária total de 8 horas."
  12. def gerar (titulo):
  13. img = Image.open("Certificado.jpg") #Image.new("RGBA", (1684,1191),(9, 132, 227))
  14. draw = ImageDraw.Draw(img)
  15. w,h = draw.textsize(titulo,font=font)
  16. draw.text((0,(height-h)/3.3),titulo.center(69),(0,0,0),font=font)
  17. # draw.text(((width-h)/8,(height-h)/3),text,(6,6,6), font=font1)
  18. #draw = ImageDraw.Draw(img)
  19. img.save("certs/"+titulo+".pdf","PDF")
  20. nomes = ["Inacio Medeiros",
  21. "Bruno Luiz Santana de Araujo",
  22. "Leonidas S. Barbosa",
  23. "Artur Rodrigues",
  24. "Júlio César Silva Aprígio",
  25. "Alysson Oliveira",
  26. "Ana Eliza Trajano",
  27. "Philippi Sedir Grilo de Morais",
  28. "Lucas Castro",
  29. "Carlos Fran",
  30. "Elionai Moura",
  31. "Matheus Henrique de Souza",
  32. "Angélica Albano de Souza Silva",
  33. "Esther Aragão da Silva Santana ",
  34. "Diego Silva de Araujo",
  35. "Simei Thander de Assis Silva",
  36. "Helenita Maciel Gurgel",
  37. "Felipe Barbosa Nicolau Fernandes",
  38. "Tell Marcus de Souza Moitas",
  39. "Lukas Pol dos Santos Paes",
  40. "Francisco Bento da Silva Júnior",
  41. "Roberta Flaviane Soares Paixão",
  42. "josé lucas de morais soares",
  43. "Jessica Lohhayne ",
  44. "Felipe caridade Fernandes",
  45. "Tereza Cristina Martins",
  46. "jonas Arthur da silva Camara",
  47. "Danilo de Souza Braga Aciola",
  48. "Amós da Silva Gonçalves",
  49. "Maria Clara Carvalho Coutinho",
  50. "Ivana Vitória de Araújo Soares",
  51. "João Tiago Arruda de Oliveira",
  52. "Guilherme Egle",
  53. "Eduardo Santos",
  54. "Luís Vitor",
  55. "Mateus Silva",
  56. "Allythy Renan",
  57. "Pedro Baesse",
  58. "Ana Clara Nobre Mendes ",
  59. "Nathecia Cunha",
  60. "Allan Kardec Cunha",
  61. "Julio Lira",
  62. "Raquel Lopes",
  63. "Julio Cesar Neves ",
  64. "Rafael Gomes (Gomex) ",
  65. "Alex Aquino ",
  66. "Alysson Oliveira ",
  67. "Caldeira Silva ",
  68. "João Marcos ",
  69. "Leonidas Barbosa",
  70. "Lucas Oliveira ",
  71. "Matheus Oliveira ",
  72. "Pedro Arthur Duarte",
  73. "Thayron Arrais ",
  74. "Victor Torres ",
  75. "Igor Bezerra",
  76. "Marney Rocha",
  77. "Anny Confessor",
  78. "Damiano Alves de Lima",
  79. "Davison Silva",
  80. "Francisco Matheus Ricelly",
  81. "Izanderson Florencio",
  82. "Jailson Silva de Oliveira",
  83. "Jilcimar Fernandes",
  84. "Juarez Valério dos Santos Junior",
  85. "Juliana Barbosa",
  86. "Letícia Moura Pinheiro",
  87. "Marconi Alves",
  88. "Marcus Nunes",
  89. "Mariel Fonseca de Moura",
  90. "Mariaelena Silveira",
  91. "Noilson Caio Teixeira",
  92. "Pablo Erick",
  93. "Pablo Pierre Ferreira Terdulino da Silva",
  94. "Rodrigo Emereciano",
  95. "Rodrigo Honorio",
  96. "Rodrigo Xavier",
  97. "Thiago Galeno",
  98. "Vitor Blondin Pires",
  99. "Welligton Miguel Silva",
  100. "Wesllen Matias",
  101. "Zelani Paulino dos Santos",
  102. "Marcelo Victor de Lima",
  103. "Pedro Osvaldo Alencar Regis",
  104. "Wanderson Douglas Souza Vasconcelos"]
  105. for i in nomes:
  106. gerar(i)
  107. #map(gerar,nomes)