Open pablo1strange opened 2 months ago
Hi!
1) please clearly state what seems to be the problem: errors, expected vs. observed results etc. 2) it would help if you could produce a minimal example that shows your problem which does not reference other libraries like openpyxl and PyPDF 3) I'm not sure you can easily combine PyPDF's TextStringObject with pdfrw. I could be wrong, however if you indeed can then this would probably not be very robust.
import openpyxl import pdfrw from PyPDF2.generic import TextStringObject, NameObject
def read_excel_data(excel_file): try: workbook = openpyxl.load_workbook(excel_file) sheet = workbook.active data = []
def fill_pdf_form(pdf_template, excel_file): try:
Leer los datos del archivo Excel
fill_pdf_form('swap.pdf', 'datos.xlsx')
PLS HELP ME ,WHATS WRONG?