# Report PDF error (solved)

**URL:** <https://community.open-emr.org/t/report-pdf-error-solved/21590>\
**Category:** Support\
**Created:** [November 27, 2023, 8:46pm UTC](https://community.open-emr.org/t/report-pdf-error-solved/21590 "2023-11-27T20:46:53Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![stephenwaite](https://community.open-emr.org/user_avatar/community.open-emr.org/stephenwaite/32/15754_2.png) [@stephenwaite](https://community.open-emr.org/u/stephenwaite)\
**Post date:** [November 28, 2023, 2:34am UTC](https://community.open-emr.org/t/report-pdf-error-solved/21590/4 "2023-11-28T02:34:23Z")

</div>

it’s a bug, after [this line](https://github.com/openemr/openemr/blob/a212cf0f12ae478e8b4a2fe082cbf8c4572d820e/interface/patient_file/report/custom_report.php#L59) in the custom\_report script, insert these 4 lines

```auto
    $config_mpdf['margin_top'] = $config_mpdf['margin_top'] * 1.5;                                                                                                                                         
    $config_mpdf['margin_bottom'] = $config_mpdf['margin_bottom'] * 1.5;                                                                                                                                   
    $config_mpdf['margin_header'] = $GLOBALS['pdf_top_margin'];                                                                                                                                            
    $config_mpdf['margin_footer'] = $GLOBALS['pdf_bottom_margin'];  

```

will get this added to the next patch

---

_[View the full topic](https://community.open-emr.org/t/report-pdf-error-solved/21590)._
