CSS

CSS PDF class

Namespace: Com\Tecnick\Pdf

Extends: SVG

Abstract: Yes

File: CSS.php line 77

CSS PDF class

Tags

  • since: 2002-08-03
  • category: Library
  • author: Nicola Asuni info@tecnick.com
  • copyright: 2002-2026 Nicola Asuni - Tecnick.com LTD
  • license: https://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE)
  • link: https://github.com/tecnickcom/tc-lib-pdf
  • phpstan-import-type: TCellBound from \Com\Tecnick\Pdf\Base
  • phpstan-import-type: TRefUnitValues from \Com\Tecnick\Pdf\Base
  • phpstan-type: BorderStyle array{ lineWidth: float, lineCap: string, lineJoin: string, miterLimit: float, dashArray: array, dashPhase: float, lineColor: string, fillColor: string, cssBorderStyle?: string, }
  • phpstan-type: BorderStyleOpt array{ lineWidth?: float, lineCap?: string, lineJoin?: string, miterLimit?: float, dashArray?: array, dashPhase?: float, lineColor?: string, fillColor?: string, cssBorderStyle?: string, }
  • phpstan-type: TCSSBorderSpacing array{ ‘H’: float, ‘V’: float, }
  • phpstan-type: TCSSData array{ ‘k’: string, ‘c’: string, ’s’: string, }
  • SuppressWarnings: (“PHPMD.DepthOfInheritance”)

Constants

BORDERPOS_DEFAULT

File: Base.php line 1405

public mixed BORDERPOS_DEFAULT = 0.0

BORDERPOS_EXTERNAL

File: Base.php line 1411

public mixed BORDERPOS_EXTERNAL = -0.5

BORDERPOS_INTERNAL

File: Base.php line 1417

public mixed BORDERPOS_INTERNAL = 0.5

ZEROCELL

File: Base.php line 1436

public TCellDef ZEROCELL = ['margin' => self::ZEROCELLBOUND, 'padding' => self::ZEROCELLBOUND, 'borderpos' => self::BORDERPOS_DEFAULT]

ZEROCELLBOUND

File: Base.php line 1424

public TCellBound ZEROCELLBOUND = ['T' => 0.0, 'R' => 0.0, 'B' => 0.0, 'L' => 0.0]

Properties

$barcode

File: Base.php line 732

public Barcode $barcode

$cache

File: Base.php line 747

public Cache $cache

$color

File: Base.php line 727

public PdfColor $color

$encrypt

File: Base.php line 722

public Encrypt $encrypt

$file

File: Base.php line 737

public File $file

$font

File: Base.php line 773

public Stack $font

$graph

File: Base.php line 768

public Draw $graph

$image

File: Base.php line 778

public Import $image

$markupFile

File: Base.php line 742

public File $markupFile

$page

File: Base.php line 763

public Page $page

$pon

File: Base.php line 1148

public int $pon = 0

$uniconv

File: Base.php line 758

public Convert $uniconv

Methods

addArtifactContent()

File: Text.php line 1036

public addArtifactContent(string $content, int $pid[, string $type = '' ][, string $subtype = '' ]) : void

This is the preferred API for decorative graphics and page furniture because it writes the wrapped content directly to the selected page.

Parameters

  • $content : string: Raw PDF operators to wrap.
  • $pid : int: Page index.
  • $type : string = ‘’: Optional Artifact /Type (for example ‘Pagination’).
  • $subtype : string = ‘’: Optional Artifact /Subtype (for example ‘Header’ or ‘Footer’).

Tags

  • throws: Exception

addGlobalCSS()

File: CSS.php line 223

public addGlobalCSS(string $css) : void

Parameters

  • $css : string: CSS content without surrounding