If you get the complete download after long delay, it may be problem with your server configuration for html2pdf. If you never get the complete file, it would be a problem due to incomplete html tags in background report generator as it tries to convert the content to pdf.
A more reliable solution is to use Gernerate Report option which will present a web page and use a PDF printer like Bullzip or Nitro
To add points to MD support comments. html2pdf conversion becomes slow when it started to converting the encounter and other forms report. As per the line 1005 in interface/patient_file/report/custom_report.php, will call the report function of each form which will be defined in interface/forms/form_dir/report.php file. This report format used to display in the openemr gui ( in encounter summary), if needed you can build custom report style for pdf generation and which can be called from custom_report.php file