kartik-v / yii2-mpdf

A Yii2 wrapper component for the mPDF library which generates PDF files from UTF-8 encoded HTML.
http://demos.krajee.com/mpdf
Other
161 stars 150 forks source link

Render error on dataprovider sort disabled #71

Closed neoacevedo closed 5 years ago

neoacevedo commented 6 years ago

Prerequisites

Steps to reproduce the issue

  1. Set sort to false on data provider: $dataProvider->setSort(false);
  2. Get HTML raw content on variable to use with PDF
  3. Configure new Pdf object $pdf = new Pdf([...]); and return PDF output

Expected behavior and actual behavior

When I follow those steps, I see... A bad render:

%PDF-1.4 %���� 3 0 obj <> (...)

It is presents only with AdminLTE and in only one view. With default theme (Yii2 predefined view), all views are rendered normally.

I was expecting... Render of view just like HTML with disabled table header sort.

Environment

PHP 7.1.12

Browsers

Operating System

Libraries

Isolating the problem

diego-betto commented 6 years ago

try setting 'mode' => Pdf::MODE_BLANK

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.