jobsta / reportbro-lib

PDF and Excel report generation library. Reports can be designed with reportbro-designer, a javascript plugin.
https://www.reportbro.com
GNU Affero General Public License v3.0
106 stars 44 forks source link

Cannot make "Create PDF with Python script" work #21

Closed kchanting closed 2 years ago

kchanting commented 2 years ago

Hi,

I hope someone could help me. I'm trying to test the ReportBro tutorial "Create PDF with Python script" (https://www.reportbro.com/guide/view/9/script-pdf). I always get this error when I run the script :

_Traceback (most recent call last): File "rbro_test.py", line 43, in report_file = report.generate_pdf() File "C:\Users\user2\Documents\py_jupyterlab\reportbro_test\venv\lib\site-packages\reportbro\reportbro.py", line 632, in generate_pdf renderer = DocumentPDFRenderer( File "C:\Users\user2\Documents\py_jupyterlab\reportbro_test\venv\lib\site-packages\reportbro\reportbro.py", line 52, in init self.pdf_doc = FPDFRB( File "C:\Users\user2\Documents\py_jupyterlab\reportbro_test\venv\lib\site-packages\reportbro\reportbro.py", line 403, in init self.set_doc_option('core_fonts_encoding', core_fonts_encoding) AttributeError: 'FPDFRB' object has no attribute 'set_docoption'

I downloaded the python script and the report template from ReportBro page. I read the Docs page but I do not understand how to solve the error.

Thank you