Skip to content

Commit

Permalink
added sample test
Browse files Browse the repository at this point in the history
  • Loading branch information
francescobianco committed Feb 7, 2016
1 parent 4c1b417 commit e89d317
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 10 deletions.
5 changes: 2 additions & 3 deletions src/Javanile/LightPDF/classes/TTFontFile.php
@@ -1,7 +1,4 @@
<?php

namespace Javanile\LightPDF\classes;

/*******************************************************************************
* TTFontFile class *
* *
Expand All @@ -18,6 +15,8 @@
* *
*******************************************************************************/

namespace Javanile\LightPDF\classes;

// Define the value used in the "head" table of a created TTF file
// 0x74727565 "true" for Mac
// 0x00010000 for Windows
Expand Down
4 changes: 3 additions & 1 deletion src/Javanile/LightPDF/classes/cssmgr.php
@@ -1,5 +1,7 @@
<?php

namespace Javanile\LightPDF\classes;

class cssmgr {

var $mpdf = null;
Expand All @@ -12,7 +14,7 @@ class cssmgr {
var $listCSSlvl;


function cssmgr(&$mpdf) {
function __construct(&$mpdf) {
$this->mpdf = $mpdf;
$this->tablecascadeCSS = array();
$this->listcascadeCSS = array();
Expand Down
3 changes: 1 addition & 2 deletions src/Javanile/LightPDF/classes/form.php
@@ -1,6 +1,5 @@
<?php


namespace Javanile\LightPDF\classes;

class form {
Expand Down Expand Up @@ -52,7 +51,7 @@ class form {
// FORMS
var $textarea_lineheight;

function form(&$mpdf) {
function __construct(&$mpdf) {
$this->mpdf = $mpdf;

// ACTIVE FORMS
Expand Down
2 changes: 1 addition & 1 deletion src/Javanile/LightPDF/classes/grad.php
Expand Up @@ -6,7 +6,7 @@ class grad {

var $mpdf = null;

function grad(&$mpdf) {
function __construct(&$mpdf) {
$this->mpdf = $mpdf;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Javanile/LightPDF/classes/tocontents.php
Expand Up @@ -32,7 +32,7 @@ class tocontents {
var $TOC_page_selector;
var $m_TOC;

function tocontents(&$mpdf) {
function __construct(&$mpdf) {
$this->mpdf = $mpdf;
$this->_toc=array();
$this->TOCmark = 0;
Expand Down
4 changes: 3 additions & 1 deletion src/Javanile/LightPDF/mPDF.php
Expand Up @@ -7651,6 +7651,8 @@ function Output($name='',$dest='')
else { $dest='F'; }
}



/*-- PROGRESS-BAR --*/
if ($this->progressBar && ($dest=='D' || $dest=='I')) {
if($name=='') { $name='mpdf.pdf'; }
Expand Down Expand Up @@ -7704,7 +7706,7 @@ function Output($name='',$dest='')
else {
if ($this->progressBar) { $this->UpdateProgressBar(3,'','Finished'); }
/*-- END PROGRESS-BAR --*/

switch($dest) {
case 'I':
if ($this->debug && !$this->allow_output_buffering && ob_get_contents()) { echo "<p>Output has already been sent from the script - PDF file generation aborted.</p>"; exit; }
Expand Down
3 changes: 2 additions & 1 deletion tests/test1.php
Expand Up @@ -23,4 +23,5 @@
$pdf->WriteHTML('<p>Hallo World</p>');

//
$pdf->Output('filename.pdf');
$pdf->Output();

0 comments on commit e89d317

Please sign in to comment.