Movatterモバイル変換


[0]ホーム

URL:


mPDF Manual – mPDF functions

StartProgressBarOutput()

(mPDF ≥ 4.2 & < 7.0)

Note: This feature was removed in mPDF 7.0

StartProgressBarOutput – Enable progress bars to be shown during file generation

Description

void StartProgressBarOutput ( [ string$mode ] )

Enable progress bars to be shown during file generation. Not recommended for general use, but may be helpful fordevelopment purposes, or for slow document generation. To set this value globally you can edit the value for$progressBar in the configuration fileconfig.php

Note: You may need to define the constant_MPDF_URI if you use progress bars. The constant_MPDF_URI is needed to redirect the user to the PDF file (and prior to mPDF 5.0 to locate a javascript file within the progress bar script). It must be either a relative path (e.g.'../') or a full URI (e.g.'http://www.mydomain.com/mpdf/').

If you do not define it before callingmPDF() mPDF will assign it the same value as_MPDF_PATH. This is fine if you have used a relative path._MPDF_PATH requires either a relative path or a filesystem real path (e.g.'/homepages/27/d84233457/htdocs/')

Parameters

$mode

Values (case-insensitive)

  • 1 orBLANK or omitted: Shows 1 progress bar (simple form)

  • 2: Shows multiple progress bars for detailed examination of progress

Default:1

Examples

<?phpdefine('_MPDF_URI','../');// must be  a relative or absolute URI - not a file system path$mpdf=new\Mpdf\Mpdf();$mpdf->StartProgressBarOutput(2);$mpdf->WriteHTML('You will hardly have time to see the progress bars!');$mpdf->Output();

Changelog

VersionDescription
4.2Variable was added.
7.0Variable was removed along with progressbar capabilities.

See Also


[8]ページ先頭

©2009-2026 Movatter.jp