Project: Remove and replace html2pdf with a more up to date tool


(Art Eaton) #21

By all means, review the PR for that!

(Abhinav Singh) #22

@teryhill are we having this project for GSOC?

(Terry Hill) #23

It is a project that could be done during GSoC. We will review all the proposals and make selections from them.

(Abhinav Singh) #24

@teryhill we are using html2pdf here which uses TCPDF. I think we can directly use TCPDF?

(Terry Hill) #25

There are a number of options out there. The tool used needs to be a current version.

(Abhinav Singh) #26

I will search for more.

(Abhinav Singh) #27

@teryhill I searched on the net and the best library I found was TCPDF. It is the most easy to use PHP library to create PDF’s and it doesn’t require executable files as everything works with Plain PHP

(Terry Hill) #28

Is there a version of it in the current code base?

(Abhinav Singh) #29

I think its not in the current code base.

(Abhinav Singh) #30

We are having FPDF perhaps.

(Terry Hill) #31

Goto GSoC Chat channel

(Abhinav Singh) #32

@teryhill I am interested in this project.

(Abhinav Singh) #33

@teryhill we have put the pdf generation code in interface/patient_file/report/custom_report.php. I propose that we create a separate file for pdf generation and which will be called when pdf generation is needed in this way we will increase the speed of the code by not unnecessarily using the pdf generation code in custom_report.php.

(Art Eaton) #34

html2pdf is by itself, and under /modules. We should only be calling it (or similar) by including the class file. Header include function files are pretty small, but should have very narrow scope. custom_report.php does not exactly meet that standard.

(Abhinav Singh) #35

@aethelwulffe I made a separate file, passed the data to the file for pdf generation. The readability of the code is improved. Today I created the pdf for Transactions part of the report. Tomorrow I will show the prototype code.

(Abhinav Singh) #36

@teryhill I was thinking of making a separate folder named pdf_generator (or something like that). All the files required for making PDFs will be kept there.

(Terry Hill) #37

That is a good Idea, maybe putting it in the Modules directory

(Abhinav Singh) #38

Yes, this type of approach will make our codebase more clean

(Abhinav Singh) #39

I am thinking about more improvements, excited for 23rd :grin:

(Terry Hill) #40

I am sweating for y’all. :worried: