PHP Class NFePHP\Extras\PdfNFePHP

Inheritance: extends NFePHP\Extras\FPDF\FPDF
Show file Open project: nfephp-org/nfephp

Public Properties

Property Type Description
$tmpFiles fim função DashedVLine

Public Methods

Method Description
CellFit ( number $w, number $h, string $txt = '', number $border, number $ln, string $align = '', boolean $fill = false, string $link = '', boolean $scale = false, boolean $force = true ) CellFit Celula com escala horizontal caso o texto seja muito largo
CellFitScale ( number $w, number $h, string $txt = '', number $border, number $ln, string $align = '', boolean $fill = false, string $link = '' ) CellFitScale Celula com escalamento horizontal somente se necessário
CellFitScaleForce ( number $w, number $h, string $txt = '', number $border, number $ln, string $align = '', boolean $fill = false, string $link = '' ) CellFitScaleForce Celula com escalamento forçado
CellFitSpace ( number $w, number $h, string $txt = '', number $border, number $ln, string $align = '', boolean $fill = false, string $link = '' ) CellFitSpace Celula com espaçamento de caracteres somente se necessário
CellFitSpaceForce ( number $w, number $h, string $txt = '', number $border, number $ln, string $align = '', boolean $fill = false, string $link = '' ) CellFitSpaceForce Celula com espaçamento de caracteres forçado
Close ( )
Code128 ( $x, $y, $code, $w, $h ) Code128 Imprime barcode 128
DashedHLine ( number $x, number $y, number $w, number $h, number $n ) : none DashedLine Desenha uma linha horizontal tracejada com o FPDF
DashedRect ( number $x1, number $y1, number $x2, number $y2, number $width = 1, number $nb = 15 ) DashedRect Desenha um retangulo com linhas tracejadas
DashedVLine ( number $x, number $y, number $w, number $yfinal, number $n ) : none DashedVLine Desenha uma linha vertical tracejada com o FPDF
Image ( $file, $x = null, $y = null, $w, $h, $type = '', $link = '', $isMask = false, $maskImg ) * * ***************************************************************************** * Public methods * * *****************************************************************************
ImagePngWithAlpha ( $file, $x, $y, $w, $h, $link = '' ) pixel-wise operation, not very fast
Rotate ( number $angle, number $x, number $y ) Rotate Rotaciona para impressão paisagem (landscape)
RoundedRect ( number $x, number $y, number $w, number $h, number $r, string $corners = '1234', string $style = '' ) RoundedRect Desenha um retangulo com cantos arredondados
WordWrap ( type &$text, type $maxwidth ) : integer WordWrap Quebra o texto para caber na caixa
__construct ( $orientation = 'P', $unit = 'mm', $format = 'A4' ) Caracteres de troca de grupo
_gamma ( $v ) GD seems to use a different gamma, this method is used to correct it again
_parsepng ( $file ) if you only use the ImagePngWithAlpha method for such PNGs, you can remove it from this script.
_putimages ( ) * * ***************************************************************************** * Private methods * * *****************************************************************************
drawTextBox ( string $strText, number $w, number $h, string $align = 'L', string $valign = 'T', boolean $border = true ) drawTextBox Monta uma caixa de texto

Private Methods

Method Description
_MBGetStringLength ( string $s ) : integer _MBGetStringLength Patch para trabalhar com textos de duplo byte CJK
_arc ( number $x1, number $y1, number $x2, number $y2, number $x3, number $y3 ) _arc Desenha o arco para arredondar o canto do retangulo
_drawRows ( number $w, number $h, string $txt, string $border, string $align = 'J', boolean $fill = false, number $maxline, number $prn ) : integer _drawRows Insere linhas de texto na caixa

Method Details

CellFit() public method

CellFit Celula com escala horizontal caso o texto seja muito largo
Author: Patrick Benny
public CellFit ( number $w, number $h, string $txt = '', number $border, number $ln, string $align = '', boolean $fill = false, string $link = '', boolean $scale = false, boolean $force = true )
$w number
$h number
$txt string
$border number
$ln number
$align string
$fill boolean
$link string
$scale boolean
$force boolean

CellFitScale() public method

CellFitScale Celula com escalamento horizontal somente se necessário
Author: Patrick Benny
public CellFitScale ( number $w, number $h, string $txt = '', number $border, number $ln, string $align = '', boolean $fill = false, string $link = '' )
$w number
$h number
$txt string
$border number
$ln number
$align string
$fill boolean
$link string

CellFitScaleForce() public method

CellFitScaleForce Celula com escalamento forçado
Author: Patrick Benny
public CellFitScaleForce ( number $w, number $h, string $txt = '', number $border, number $ln, string $align = '', boolean $fill = false, string $link = '' )
$w number
$h number
$txt string
$border number
$ln number
$align string
$fill boolean
$link string

CellFitSpace() public method

CellFitSpace Celula com espaçamento de caracteres somente se necessário
Author: Patrick Benny
public CellFitSpace ( number $w, number $h, string $txt = '', number $border, number $ln, string $align = '', boolean $fill = false, string $link = '' )
$w number
$h number
$txt string
$border number
$ln number
$align string
$fill boolean
$link string

CellFitSpaceForce() public method

CellFitSpaceForce Celula com espaçamento de caracteres forçado
Author: Patrick Benny
public CellFitSpaceForce ( number $w, number $h, string $txt = '', number $border, number $ln, string $align = '', boolean $fill = false, string $link = '' )
$w number
$h number
$txt string
$border number
$ln number
$align string
$fill boolean
$link string

Close() public method

public Close ( )

Code128() public method

Code128 Imprime barcode 128
Author: Roland Gautier
public Code128 ( $x, $y, $code, $w, $h )

DashedHLine() public method

DashedLine Desenha uma linha horizontal tracejada com o FPDF
public DashedHLine ( number $x, number $y, number $w, number $h, number $n ) : none
$x number Posição horizontal inicial, em mm
$y number Posição vertical inicial, em mm
$w number Comprimento da linha, em mm
$h number Espessura da linha, em mm
$n number Numero de traços na seção da linha com o comprimento $w
return none

DashedRect() public method

DashedRect Desenha um retangulo com linhas tracejadas
Author: Antoine Michéa
public DashedRect ( number $x1, number $y1, number $x2, number $y2, number $width = 1, number $nb = 15 )
$x1 number
$y1 number
$x2 number
$y2 number
$width number
$nb number

DashedVLine() public method

DashedVLine Desenha uma linha vertical tracejada com o FPDF
public DashedVLine ( number $x, number $y, number $w, number $yfinal, number $n ) : none
$x number Posição horizontal inicial, em mm
$y number Posição vertical inicial, em mm
$w number Comprimento da linha, em mm
$yfinal number Espessura da linha, em mm
$n number Numero de traços na seção da linha com o comprimento $w
return none

Image() public method

* * ***************************************************************************** * Public methods * * *****************************************************************************
public Image ( $file, $x = null, $y = null, $w, $h, $type = '', $link = '', $isMask = false, $maskImg )

ImagePngWithAlpha() public method

pixel-wise operation, not very fast
public ImagePngWithAlpha ( $file, $x, $y, $w, $h, $link = '' )

Rotate() public method

Rotate Rotaciona para impressão paisagem (landscape)
Author: Oliver
public Rotate ( number $angle, number $x, number $y )
$angle number
$x number
$y number

RoundedRect() public method

RoundedRect Desenha um retangulo com cantos arredondados
Author: Maxime Delorme & Christophe Prugnaud
public RoundedRect ( number $x, number $y, number $w, number $h, number $r, string $corners = '1234', string $style = '' )
$x number
$y number
$w number
$h number
$r number
$corners string
$style string

WordWrap() public method

WordWrap Quebra o texto para caber na caixa
Author: Ron Korving
public WordWrap ( type &$text, type $maxwidth ) : integer
$text type
$maxwidth type
return integer

__construct() public method

Caracteres de troca de grupo
public __construct ( $orientation = 'P', $unit = 'mm', $format = 'A4' )

_gamma() public method

GD seems to use a different gamma, this method is used to correct it again
public _gamma ( $v )

_parsepng() public method

if you only use the ImagePngWithAlpha method for such PNGs, you can remove it from this script.
public _parsepng ( $file )

_putimages() public method

* * ***************************************************************************** * Private methods * * *****************************************************************************
public _putimages ( )

drawTextBox() public method

drawTextBox Monta uma caixa de texto
Author: Darren Gates & Adrian Tufa
public drawTextBox ( string $strText, number $w, number $h, string $align = 'L', string $valign = 'T', boolean $border = true )
$strText string
$w number
$h number
$align string
$valign string
$border boolean

Property Details

$tmpFiles public property

fim função DashedVLine
public $tmpFiles