亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? html2fpdf.php

?? asterisk用 的voip記費軟件
?? PHP
字號:
<?php
/*
*** General-use version

DEBUG HINT:
- Inside function printbuffer make $fill=1
- Inside function Cell make:
if($fill==1 or $border==1)
{
//		if ($fill==1) $op=($border==1) ? 'B' : 'f';
//		else $op='S';
$op='S';
- Following these 2 steps you will be able to see the cell's boundaries

WARNING: When adding a new tag support, also add its name inside the function DisableTags()'s very long string

ODDITIES (?):
. It seems like saved['border'] and saved['bgcolor'] are useless inside the FlowingBlock...
These 2 attributes do the same thing?!?:
. $this->currentfont - mine
. $this->CurrentFont - fpdf's

TODO (in the future...):
- Make font-family, font-size, lineheight customizable
- Increase number of HTML/CSS tags/properties, Image/Font Types, recognized/supported
- allow BMP support? (tried with http://phpthumb.sourceforge.net/ but failed)
- Improve CSS support
- support image side-by-side or one-below-another or both?
- Improve code clarity even more (modularize and get better var names like on textbuffer array's indexes for example)

//////////////////////////////////////////////////////////////////////////////
//////////////DO NOT MODIFY THE CONTENTS OF THIS BOX//////////////////////////
//////////////////////////////////////////////////////////////////////////////
//                                                                          //
// HTML2FPDF is a php script to read a HTML text and generate a PDF file.   //
// Copyright (C) 2004-2005 Renato Coelho                                    //
// This script may be distributed as long as the following files are kept   //
// together: 								                                                //
//	                          					                                    //
// fpdf.php, html2fpdf.php, gif.php,htmltoolkit.php,license.txt,credits.txt //
//                                                                          //
//////////////////////////////////////////////////////////////////////////////

Misc. Observations:
- CSS + align = bug! (?)
OBS1: para textos de mais de 1 p醙ina, talvez tenha que juntar varios $texto_artigo
antes de mandar gerar o PDF, para que o PDF gerado seja completo.
OBS2: there are 2 types of spaces 32 and 160 (ascii values)
OBS3: //! is a special comment to be used with source2doc.php, a script I created
in order to generate the doc on the site html2fpdf.sf.net
OBS4: var $LineWidth; // line width in user unit - use this to make css thin/medium/thick work
OBS5: Images and Textareas: when they are inserted you can only type below them (==display:block)
OBS6: Optimized to 'A4' paper (default font: Arial , normal , size 11 )
OBS7: Regexp + Perl ([preg]accepts non-greedy quantifiers while PHP[ereg] does not)
Perl:  '/regexp/x'  where x == option ( x = i:ignore case , x = s: DOT gets \n as well)
========================END OF INITIAL COMMENTS=================================
*/

define('HTML2FPDF_VERSION','3.0(beta)');
if (!defined('RELATIVE_PATH')) define('RELATIVE_PATH','');
if (!defined('FPDF_FONTPATH')) define('FPDF_FONTPATH','font/');
require_once(RELATIVE_PATH.'fpdf.php');
require_once(RELATIVE_PATH.'htmltoolkit.php');

class HTML2FPDF extends FPDF
{
//internal attributes
var $HREF; //! string
var $pgwidth; //! float
var $fontlist; //! array 
var $issetfont; //! bool
var $issetcolor; //! bool
var $titulo; //! string
var $oldx; //! float
var $oldy; //! float
var $B; //! int
var $U; //! int
var $I; //! int

var $tablestart; //! bool
var $tdbegin; //! bool
var $table; //! array
var $cell; //! array 
var $col; //! int
var $row; //! int

var $divbegin; //! bool
var $divalign; //! char
var $divwidth; //! float
var $divheight; //! float
var $divbgcolor; //! bool
var $divcolor; //! bool
var $divborder; //! int
var $divrevert; //! bool

var $listlvl; //! int
var $listnum; //! int
var $listtype; //! string
//array(lvl,# of occurrences)
var $listoccur; //! array
//array(lvl,occurrence,type,maxnum)
var $listlist; //! array
//array(lvl,num,content,type)
var $listitem; //! array

var $buffer_on; //! bool
var $pbegin; //! bool
var $pjustfinished; //! bool
var $blockjustfinished; //! bool
var $SUP; //! bool
var $SUB; //! bool
var $toupper; //! bool
var $tolower; //! bool
var $dash_on; //! bool
var $dotted_on; //! bool
var $strike; //! bool

var $CSS; //! array
var $cssbegin; //! bool
var $backupcss; //! array
var $textbuffer; //! array
var	$currentstyle; //! string
var $currentfont; //! string
var $colorarray; //! array
var $bgcolorarray; //! array
var $internallink; //! array
var $enabledtags; //! string

var $lineheight; //! int
var $basepath; //! string
// array('COLOR','WIDTH','OLDWIDTH')
var $outlineparam; //! array
var $outline_on; //! bool

var $specialcontent; //! string
var $selectoption; //! array

//options attributes
var $usecss; //! bool
var $usepre; //! bool
var $usetableheader; //! bool
var $shownoimg; //! bool

function HTML2FPDF($orientation='P',$unit='mm',$format='A4')
{
//! @desc Constructor
//! @return An object (a class instance)
	//Call parent constructor
	$this->FPDF($orientation,$unit,$format);
	//To make the function Footer() work properly
	$this->AliasNbPages();
	//Enable all tags as default
	$this->DisableTags();
  //Set default display preferences
  $this->DisplayPreferences('');
	//Initialization of the attributes
	$this->SetFont('Arial','',11); // Changeable?(not yet...)
  $this->lineheight = 5; // Related to FontSizePt == 11
  $this->pgwidth = $this->fw - $this->lMargin - $this->rMargin ;
  $this->SetFillColor(255);
	$this->HREF='';
	$this->titulo='';
	$this->oldx=-1;
	$this->oldy=-1;
	$this->B=0;
	$this->U=0;
	$this->I=0;

  $this->listlvl=0;
  $this->listnum=0; 
  $this->listtype='';
  $this->listoccur=array();
  $this->listlist=array();
  $this->listitem=array();

  $this->tablestart=false;
  $this->tdbegin=false; 
  $this->table=array(); 
  $this->cell=array();  
  $this->col=-1; 
  $this->row=-1; 

	$this->divbegin=false;
	$this->divalign="L";
	$this->divwidth=0; 
	$this->divheight=0; 
	$this->divbgcolor=false;
	$this->divcolor=false;
	$this->divborder=0;
	$this->divrevert=false;

	$this->fontlist=array("arial","times","courier","helvetica","symbol","monospace","serif","sans");
	$this->issetfont=false;
	$this->issetcolor=false;

  $this->pbegin=false;
  $this->pjustfinished=false;
  $this->blockjustfinished = true; //in order to eliminate exceeding left-side spaces
  $this->toupper=false;
  $this->tolower=false;
	$this->dash_on=false;
	$this->dotted_on=false;
  $this->SUP=false;
  $this->SUB=false;
  $this->buffer_on=false;
  $this->strike=false;

	$this->currentfont='';
	$this->currentstyle='';
  $this->colorarray=array();
  $this->bgcolorarray=array();
	$this->cssbegin=false;
  $this->textbuffer=array();
	$this->CSS=array();
	$this->backupcss=array();
	$this->internallink=array();

  $this->basepath = "";
  
  $this->outlineparam = array();
  $this->outline_on = false;

  $this->specialcontent = '';
  $this->selectoption = array();

  $this->shownoimg=false;
  $this->usetableheader=false;
  $this->usecss=true;
  $this->usepre=true;
}

function setBasePath($str)
{
//! @desc Inform the script where the html file is (full path - e.g. http://www.google.com/dir1/dir2/dir3/file.html ) in order to adjust HREF and SRC links. No-Parameter: The directory where this script is.
//! @return void
  $this->basepath = dirname($str) . "/";
  $this->basepath = str_replace("\\","/",$this->basepath); //If on Windows
}

function ShowNOIMG_GIF($opt=true)
{
//! @desc Enable/Disable Displaying the no_img.gif when an image is not found. No-Parameter: Enable
//! @return void
  $this->shownoimg=$opt;
}

function UseCSS($opt=true)
{
//! @desc Enable/Disable CSS recognition. No-Parameter: Enable
//! @return void
  $this->usecss=$opt;
}

function UseTableHeader($opt=true)
{
//! @desc Enable/Disable Table Header to appear every new page. No-Parameter: Enable
//! @return void
  $this->usetableheader=$opt;
}

function UsePRE($opt=true)
{
//! @desc Enable/Disable pre tag recognition. No-Parameter: Enable
//! @return void
  $this->usepre=$opt;
}

//Page header
function Header($content='')
{
//! @return void
//! @desc The header is printed in every page.
  if($this->usetableheader and $content != '')
  {
    $y = $this->y;
    foreach($content as $tableheader)
    {
      $this->y = $y;
      //Set some cell values
      $x = $tableheader['x'];
      $w = $tableheader['w'];
      $h = $tableheader['h'];
      $va = $tableheader['va'];
      $mih = $tableheader['mih'];
      $fill = $tableheader['bgcolor'];
      $border = $tableheader['border'];
      $align = $tableheader['a'];
      //Align
      $this->divalign=$align;
			$this->x = $x;
		  //Vertical align
		  if (!isset($va) || $va=='M') $this->y += ($h-$mih)/2;
      elseif (isset($va) && $va=='B') $this->y += $h-$mih;
			if ($fill)
      {
 					$color = ConvertColor($fill);
 					$this->SetFillColor($color['R'],$color['G'],$color['B']);
 					$this->Rect($x, $y, $w, $h, 'F');
			}
   		//Border
  		if (isset($border) and $border != 'all') $this->_tableRect($x, $y, $w, $h, $border);
  		elseif (isset($border) && $border == 'all') $this->Rect($x, $y, $w, $h);
  		//Print cell content
      $this->divwidth = $w-2;
      $this->divheight = 1.1*$this->lineheight;
      $textbuffer = $tableheader['textbuffer'];
      if (!empty($textbuffer)) $this->printbuffer($textbuffer,false,true/*inside a table*/);
      $textbuffer = array();
    }
    $this->y = $y + $h; //Update y coordinate
  }//end of 'if usetableheader ...'
}

//Page footer
function Footer()
{
//! @return void
//! @desc The footer is printed in every page!
    //Position at 1.0 cm from bottom
    $this->SetY(-10);
    //Copyright //especial para esta vers鉶
    $this->SetFont('Arial','B',9);
  	$this->SetTextColor(0);
    //Arial italic 9
    $this->SetFont('Arial','I',9);
    //Page number
    $this->Cell(0,10,$this->PageNo().'/{nb}',0,0,'C');
    //Return Font to normal
    $this->SetFont('Arial','',11);
}

///////////////////
/// HTML parser ///
///////////////////
function WriteHTML($html)
{
//! @desc HTML parser
//! @return void
/* $e == content */

  $this->ReadMetaTags($html);
  $html = AdjustHTML($html,$this->usepre); //Try to make HTML look more like XHTML
  if ($this->usecss) $html = $this->ReadCSS($html);
	//Add new supported tags in the DisableTags function
	$html=str_replace('<?php ','< ',$html); //Fix '<?php XML' bug from HTML code generated by MS Word
	$html=strip_tags($html,$this->enabledtags); //remove all unsupported tags, but the ones inside the 'enabledtags' string
  //Explode the string in order to parse the HTML code
	$a=preg_split('/<(.*?)>/ms',$html,-1,PREG_SPLIT_DELIM_CAPTURE);

	foreach($a as $i => $e)
	{

		if($i%2==0)
		{
			//TEXT

			//Adjust lineheight
      //			$this->lineheight = (5*$this->FontSizePt)/11; //should be inside printbuffer?
			//Adjust text, if needed
			if (strpos($e,"&") !== false) //HTML-ENTITIES decoding
			{
        if (strpos($e,"#") !== false) $e = value_entity_decode($e); // Decode value entities
        //Avoid crashing the script on PHP 4.0
        $version = phpversion();
        $version = str_replace('.','',$version);
        if ($version >= 430) $e = html_entity_decode($e,ENT_QUOTES,'cp1252'); // changes &nbsp; and the like by their respective char
        else $e = lesser_entity_decode($e);
      }
      $e = str_replace(chr(160),chr(32),$e); //unify ascii code of spaces (in order to recognize all of them correctly)
      if (strlen($e) == 0) continue;
			if ($this->divrevert) $e = strrev($e);
			if ($this->toupper) $e = strtoupper($e);
			if ($this->tolower) $e = strtolower($e);
      //Start of 'if/elseif's
			if($this->titulo) $this->SetTitle($e);
  		elseif($this->specialcontent)
			{
			    if ($this->specialcontent == "type=select" and $this->selectoption['ACTIVE'] == true) //SELECT tag (form element)
          {
             $stringwidth = $this->GetStringWidth($e);
             if (!isset($this->selectoption['MAXWIDTH']) or $stringwidth > $this->selectoption['MAXWIDTH']) $this->selectoption['MAXWIDTH'] = $stringwidth;
             if (!isset($this->selectoption['SELECTED']) or $this->selectoption['SELECTED'] == '') $this->selectoption['SELECTED'] = $e;
          }
          else $this->textbuffer[] = array("護

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产日韩欧美麻豆| 午夜欧美一区二区三区在线播放| 国产精品久久久久久久久搜平片| 亚洲欧美日本韩国| 精品亚洲免费视频| 色婷婷精品大视频在线蜜桃视频| 日韩视频一区二区在线观看| 亚洲日本在线天堂| 国产一区二区三区日韩| 色婷婷国产精品久久包臀| 日韩欧美亚洲国产另类| 一区二区三区在线观看视频| 国产在线麻豆精品观看| 欧美日韩亚州综合| 亚洲欧洲av在线| 国产在线不卡视频| 欧美人妇做爰xxxⅹ性高电影| 国产欧美一区二区在线观看| 日韩福利电影在线| 欧美在线999| 国产精品美女久久久久av爽李琼 | 亚洲免费电影在线| 国内精品在线播放| 91精品免费在线观看| 亚洲线精品一区二区三区| av不卡在线播放| 久久精品综合网| 久久精品国产久精国产| 777午夜精品视频在线播放| 一区二区三区精品| 色天天综合色天天久久| 国产精品久久久久久久久免费丝袜| 九九九久久久精品| 日韩情涩欧美日韩视频| 婷婷开心激情综合| 欧美性xxxxx极品少妇| 亚洲欧美日韩小说| 色八戒一区二区三区| 亚洲少妇最新在线视频| 成人开心网精品视频| 中文字幕电影一区| 粉嫩aⅴ一区二区三区四区| 久久久久久一二三区| 狠狠狠色丁香婷婷综合久久五月| 欧美一区二区三区人| 日韩电影在线免费看| 91精品国产色综合久久不卡电影 | 97se狠狠狠综合亚洲狠狠| 国产精品私房写真福利视频| 国产成人精品一区二区三区四区 | 国产日韩欧美a| 成人性生交大片免费看视频在线| 国产日韩欧美在线一区| jiyouzz国产精品久久| 17c精品麻豆一区二区免费| 99久久精品国产麻豆演员表| 亚洲黄色av一区| 欧美视频中文一区二区三区在线观看| 亚洲电影第三页| 欧美一区二区三区人| 国产麻豆一精品一av一免费| 欧美国产一区视频在线观看| 不卡电影免费在线播放一区| 亚洲精品视频在线| 精品视频全国免费看| 裸体歌舞表演一区二区| 国产日韩欧美在线一区| 91成人在线观看喷潮| 日韩成人一级片| 国产女人aaa级久久久级| 91首页免费视频| 日本不卡高清视频| 欧美激情在线一区二区| 91久久久免费一区二区| 日本麻豆一区二区三区视频| 中文字幕欧美激情| 欧美三级电影网| 国产一区二区三区高清播放| 亚洲欧洲精品一区二区精品久久久 | 五月天激情综合| 久久天天做天天爱综合色| 99精品热视频| 久久er精品视频| 亚洲女人****多毛耸耸8| 欧美一区二区三区免费观看视频 | 免费在线观看不卡| 国产精品私人自拍| 69久久99精品久久久久婷婷| 东方aⅴ免费观看久久av| 亚洲午夜精品在线| 国产日韩v精品一区二区| 欧美日韩和欧美的一区二区| 国产成人av影院| 日日夜夜免费精品| 亚洲欧美综合另类在线卡通| 欧美精品一区二区蜜臀亚洲| 91激情五月电影| 国产丶欧美丶日本不卡视频| 日本va欧美va瓶| 一区二区三区久久| 国产精品美女久久久久久久网站| 欧美大白屁股肥臀xxxxxx| 91国偷自产一区二区使用方法| 国内成人免费视频| 日日夜夜一区二区| 亚洲高清不卡在线观看| 中文字幕在线播放不卡一区| 精品国产三级a在线观看| 欧美少妇xxx| 在线免费观看日韩欧美| 成人小视频在线观看| 激情综合色丁香一区二区| 亚洲v精品v日韩v欧美v专区| 亚洲三级在线免费观看| 中文字幕中文字幕在线一区 | 国产午夜久久久久| 欧美成人精品1314www| 欧美日韩中文字幕精品| 99免费精品在线观看| 国产精品一区免费视频| 蜜臀av一区二区在线观看| 午夜视频在线观看一区| 夜色激情一区二区| 亚洲一区二区三区四区五区中文| 亚洲女爱视频在线| 亚洲视频免费看| 亚洲视频小说图片| 一区二区三区在线观看国产| 亚洲人精品一区| 亚洲一卡二卡三卡四卡无卡久久| 亚洲精品免费在线观看| 中文字幕亚洲区| 亚洲天堂网中文字| 一区二区三区免费在线观看| 亚洲男人的天堂在线观看| 亚洲综合色噜噜狠狠| 亚洲国产视频a| 天天综合日日夜夜精品| 日日摸夜夜添夜夜添亚洲女人| 日韩精品乱码免费| 精油按摩中文字幕久久| 国产精品综合视频| proumb性欧美在线观看| 91黄色激情网站| 91精品国产欧美一区二区18 | 亚洲国产成人一区二区三区| 中文字幕制服丝袜成人av| 亚洲毛片av在线| 日本亚洲视频在线| 国产麻豆精品theporn| a亚洲天堂av| 欧美午夜精品理论片a级按摩| 51午夜精品国产| 久久亚洲精精品中文字幕早川悠里| 国产精品久久久久影院老司 | 国产乱色国产精品免费视频| 成人午夜视频在线观看| 欧美探花视频资源| 久久综合久久久久88| 综合欧美一区二区三区| 日韩精品国产欧美| 国产不卡在线一区| 欧美色图片你懂的| 久久日韩粉嫩一区二区三区 | 91精品国产日韩91久久久久久| 久久女同精品一区二区| 亚洲欧美日韩中文字幕一区二区三区 | 精品影院一区二区久久久| av在线免费不卡| 在线播放一区二区三区| 国产亚洲视频系列| 亚洲成人黄色影院| 国产.欧美.日韩| 欧美二区乱c少妇| 欧美韩国日本一区| 美女视频黄频大全不卡视频在线播放| 国产一区二区在线看| 在线观看亚洲a| 国产欧美一二三区| 免费成人在线观看视频| 色猫猫国产区一区二在线视频| 精品精品国产高清a毛片牛牛 | 性欧美大战久久久久久久久| 国产一区二区91| 91麻豆精品国产无毒不卡在线观看| 国产精品色噜噜| 国产一区二三区| 日韩美女在线视频| 亚洲成va人在线观看| 99精品在线免费| 国产精品久久久久天堂| 寂寞少妇一区二区三区| 欧美精三区欧美精三区| 亚洲欧美色综合| 99久久久无码国产精品| 国产欧美精品日韩区二区麻豆天美| 日韩极品在线观看| 欧美日韩综合在线免费观看| 亚洲色图19p| 91视频在线看|