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

**URL:** <https://forums.librehealth.io/t/project-remove-and-replace-html2pdf-with-a-more-up-to-date-tool/1844>\
**Category:** Google Summer of Code\
**Tags:** gsoc2018, ehr, gsoc2018-project\
**Created:** [January 5, 2018, 6:43pm UTC](https://forums.librehealth.io/t/project-remove-and-replace-html2pdf-with-a-more-up-to-date-tool/1844 "2018-01-05T18:43:59Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![teryhill](https://forums.librehealth.io/user_avatar/forums.librehealth.io/teryhill/32/58_2.png) [@teryhill](https://forums.librehealth.io/u/teryhill)\
**Post date:** [January 5, 2018, 6:43pm UTC](https://forums.librehealth.io/t/project-remove-and-replace-html2pdf-with-a-more-up-to-date-tool/1844/1 "2018-01-05T18:43:59Z")

</div>

**Background**

The system currently uses html2pdf to generate pdf reports . This needs to be migrated to a better model for printing the PDF documents. This could be an opensource project like MPDF or just changes to the code base to use native PHP calls .

**Technical requirements**

1. Mysql
2. PHP

**Mentors:** @tony @aethelwulffe @teryhill

---

<div class="post-metadata">

**Author:** ![aethelwulffe](https://forums.librehealth.io/user_avatar/forums.librehealth.io/aethelwulffe/32/63_2.png) [@aethelwulffe](https://forums.librehealth.io/u/aethelwulffe)\
**Post date:** [January 13, 2018, 7:54pm UTC](https://forums.librehealth.io/t/project-remove-and-replace-html2pdf-with-a-more-up-to-date-tool/1844/2 "2018-01-13T19:54:48Z")

</div>

HTML2pdf as well as another tool I think.

This task suggestion is very closely related to issues with the patient record reports and export. The coding of the HTML output of those greatly affect the output quality of a PDF.

---

<div class="post-metadata">

**Author:** ![Abhinav](https://forums.librehealth.io/user_avatar/forums.librehealth.io/abhinav/32/626_2.png) [@Abhinav](https://forums.librehealth.io/u/Abhinav)\
**Post date:** [January 19, 2018, 2:59pm UTC](https://forums.librehealth.io/t/project-remove-and-replace-html2pdf-with-a-more-up-to-date-tool/1844/3 "2018-01-19T14:59:23Z")

</div>

I think the way pdf is formatted is very directly dependent on the way HTML is formatted . I have a plan to use PHP pdf tools to provide proper indentation and formatting to pdf generated.

---

<div class="post-metadata">

**Author:** ![Abhinav](https://forums.librehealth.io/user_avatar/forums.librehealth.io/abhinav/32/626_2.png) [@Abhinav](https://forums.librehealth.io/u/Abhinav)\
**Post date:** [January 19, 2018, 3:34pm UTC](https://forums.librehealth.io/t/project-remove-and-replace-html2pdf-with-a-more-up-to-date-tool/1844/4 "2018-01-19T15:34:34Z")

</div>

I think we should remove the dependency on HTML2pdf and work with PHP built in tools

---

<div class="post-metadata">

**Author:** ![teryhill](https://forums.librehealth.io/user_avatar/forums.librehealth.io/teryhill/32/58_2.png) [@teryhill](https://forums.librehealth.io/u/teryhill)\
**Post date:** [January 19, 2018, 3:34pm UTC](https://forums.librehealth.io/t/project-remove-and-replace-html2pdf-with-a-more-up-to-date-tool/1844/5 "2018-01-19T15:34:37Z")

</div>

One of the things that should be added is Patient Identifiers on each printed page. The ability to “turn these on or off”. Consistent reports that look good as a PDF.

---

<div class="post-metadata">

**Author:** ![teryhill](https://forums.librehealth.io/user_avatar/forums.librehealth.io/teryhill/32/58_2.png) [@teryhill](https://forums.librehealth.io/u/teryhill)\
**Post date:** [January 19, 2018, 3:36pm UTC](https://forums.librehealth.io/t/project-remove-and-replace-html2pdf-with-a-more-up-to-date-tool/1844/6 "2018-01-19T15:36:01Z")

</div>

Yes that would be Ideal

---

<div class="post-metadata">

**Author:** ![Abhinav](https://forums.librehealth.io/user_avatar/forums.librehealth.io/abhinav/32/626_2.png) [@Abhinav](https://forums.librehealth.io/u/Abhinav)\
**Post date:** [January 19, 2018, 3:37pm UTC](https://forums.librehealth.io/t/project-remove-and-replace-html2pdf-with-a-more-up-to-date-tool/1844/7 "2018-01-19T15:37:19Z")

</div>

Sir can you please send the detailed know hows of this project on my email [abhinavsingh22@hotmail.com](mailto:abhinavsingh22@hotmail.com) so that I could understand it well and work on the format of pdf. That would be helpfull 🙂

---

<div class="post-metadata">

**Author:** ![teryhill](https://forums.librehealth.io/user_avatar/forums.librehealth.io/teryhill/32/58_2.png) [@teryhill](https://forums.librehealth.io/u/teryhill)\
**Post date:** [January 19, 2018, 3:39pm UTC](https://forums.librehealth.io/t/project-remove-and-replace-html2pdf-with-a-more-up-to-date-tool/1844/8 "2018-01-19T15:39:50Z")

</div>

All conversations needs to be public here on the forums or on Github.

It is up to the GSoC participant to formulate the proposal based on the project. You will choose the tools, and out line a time line and scope of work.

---

<div class="post-metadata">

**Author:** ![Abhinav](https://forums.librehealth.io/user_avatar/forums.librehealth.io/abhinav/32/626_2.png) [@Abhinav](https://forums.librehealth.io/u/Abhinav)\
**Post date:** [January 19, 2018, 3:42pm UTC](https://forums.librehealth.io/t/project-remove-and-replace-html2pdf-with-a-more-up-to-date-tool/1844/9 "2018-01-19T15:42:36Z")

</div>

Could you please upload the sample of generated pdf, that would be very helpful if its possible

---

<div class="post-metadata">

**Author:** ![teryhill](https://forums.librehealth.io/user_avatar/forums.librehealth.io/teryhill/32/58_2.png) [@teryhill](https://forums.librehealth.io/u/teryhill)\
**Post date:** [January 19, 2018, 3:44pm UTC](https://forums.librehealth.io/t/project-remove-and-replace-html2pdf-with-a-more-up-to-date-tool/1844/10 "2018-01-19T15:44:59Z")

</div>

Have you loaded the code to your local system?

[report (2).pdf](https://forums.librehealth.io/uploads/default/original/1X/23da59baeacb3bf4d3833fccee945bc14cd23499.pdf) (16.5 KB)

---

<div class="post-metadata">

**Author:** ![Abhinav](https://forums.librehealth.io/user_avatar/forums.librehealth.io/abhinav/32/626_2.png) [@Abhinav](https://forums.librehealth.io/u/Abhinav)\
**Post date:** [January 19, 2018, 3:45pm UTC](https://forums.librehealth.io/t/project-remove-and-replace-html2pdf-with-a-more-up-to-date-tool/1844/11 "2018-01-19T15:45:54Z")

</div>

Yes I just did it, now I am a look at the code base, this will be perfect

---

<div class="post-metadata">

**Author:** ![Abhinav](https://forums.librehealth.io/user_avatar/forums.librehealth.io/abhinav/32/626_2.png) [@Abhinav](https://forums.librehealth.io/u/Abhinav)\
**Post date:** [January 19, 2018, 3:46pm UTC](https://forums.librehealth.io/t/project-remove-and-replace-html2pdf-with-a-more-up-to-date-tool/1844/12 "2018-01-19T15:46:49Z")

</div>

Thank you for the pdf 🙂

---

<div class="post-metadata">

**Author:** ![teryhill](https://forums.librehealth.io/user_avatar/forums.librehealth.io/teryhill/32/58_2.png) [@teryhill](https://forums.librehealth.io/u/teryhill)\
**Post date:** [January 19, 2018, 3:47pm UTC](https://forums.librehealth.io/t/project-remove-and-replace-html2pdf-with-a-more-up-to-date-tool/1844/13 "2018-01-19T15:47:05Z")

</div>

You will need to setup the software and add some fictitious data so you can test your changes.

---

<div class="post-metadata">

**Author:** ![Abhinav](https://forums.librehealth.io/user_avatar/forums.librehealth.io/abhinav/32/626_2.png) [@Abhinav](https://forums.librehealth.io/u/Abhinav)\
**Post date:** [January 19, 2018, 3:52pm UTC](https://forums.librehealth.io/t/project-remove-and-replace-html2pdf-with-a-more-up-to-date-tool/1844/14 "2018-01-19T15:52:06Z")

</div>

Yes and I also looked at the pdf I think it just need some better formatting , what do you say sir ?

---

<div class="post-metadata">

**Author:** ![teryhill](https://forums.librehealth.io/user_avatar/forums.librehealth.io/teryhill/32/58_2.png) [@teryhill](https://forums.librehealth.io/u/teryhill)\
**Post date:** [January 19, 2018, 3:53pm UTC](https://forums.librehealth.io/t/project-remove-and-replace-html2pdf-with-a-more-up-to-date-tool/1844/15 "2018-01-19T15:53:47Z")

</div>

All instances where the data is presented to the customer as a report needs to be consistent and made to look nice.

---

<div class="post-metadata">

**Author:** ![aethelwulffe](https://forums.librehealth.io/user_avatar/forums.librehealth.io/aethelwulffe/32/63_2.png) [@aethelwulffe](https://forums.librehealth.io/u/aethelwulffe)\
**Post date:** [January 19, 2018, 7:09pm UTC](https://forums.librehealth.io/t/project-remove-and-replace-html2pdf-with-a-more-up-to-date-tool/1844/16 "2018-01-19T19:09:21Z")

</div>

@Abhinav Completely correct on the HTML being the primary factor. Also correct on [http://php.net/manual/en/ref.pdf.php](http://php.net/manual/en/ref.pdf.php) being the best way to get quality results.

---

<div class="post-metadata">

**Author:** ![Abhinav](https://forums.librehealth.io/user_avatar/forums.librehealth.io/abhinav/32/626_2.png) [@Abhinav](https://forums.librehealth.io/u/Abhinav)\
**Post date:** [January 20, 2018, 12:25pm UTC](https://forums.librehealth.io/t/project-remove-and-replace-html2pdf-with-a-more-up-to-date-tool/1844/17 "2018-01-20T12:25:01Z")

</div>

Thank you sir and I am just viewing the code base presently.

---

<div class="post-metadata">

**Author:** ![Abhinav](https://forums.librehealth.io/user_avatar/forums.librehealth.io/abhinav/32/626_2.png) [@Abhinav](https://forums.librehealth.io/u/Abhinav)\
**Post date:** [January 20, 2018, 12:27pm UTC](https://forums.librehealth.io/t/project-remove-and-replace-html2pdf-with-a-more-up-to-date-tool/1844/18 "2018-01-20T12:27:24Z")

</div>

I also found that when we click on **Download Pdf** button nothing happens.

 ![Screenshot from 2018-01-20 23-25-09](https://forums.librehealth.io/uploads/default/original/1X/15afaf58a17cfe1743727efc4bb31b389474d1f9.png)

---

<div class="post-metadata">

**Author:** ![teryhill](https://forums.librehealth.io/user_avatar/forums.librehealth.io/teryhill/32/58_2.png) [@teryhill](https://forums.librehealth.io/u/teryhill)\
**Post date:** [January 20, 2018, 3:54pm UTC](https://forums.librehealth.io/t/project-remove-and-replace-html2pdf-with-a-more-up-to-date-tool/1844/19 "2018-01-20T15:54:26Z")

</div>

Look for the error in the php error log. That was fixed but may not be in the code base yet.

---

<div class="post-metadata">

**Author:** ![Abhinav](https://forums.librehealth.io/user_avatar/forums.librehealth.io/abhinav/32/626_2.png) [@Abhinav](https://forums.librehealth.io/u/Abhinav)\
**Post date:** [January 20, 2018, 4:00pm UTC](https://forums.librehealth.io/t/project-remove-and-replace-html2pdf-with-a-more-up-to-date-tool/1844/20 "2018-01-20T16:00:27Z")

</div>

Thank You I will have a look.

[Next page](https://forums.librehealth.io/t/project-remove-and-replace-html2pdf-with-a-more-up-to-date-tool/1844.md?page=2)
