PdfColor

PDF color adapter with conformance-aware output.

Namespace: Com\Tecnick\Pdf

Extends: Pdf

File: PdfColor.php line 34

PDF color adapter with conformance-aware output.

Tags

Methods

getEmittedCmykSpotColors()

File: PdfColor.php line 74

public getEmittedCmykSpotColors() : array<int, string>

Return values

array<int, string>

getPdfColor()

File: PdfColor.php line 223

public getPdfColor(string $color[, bool $stroke = false ][, float $tint = 1 ][, bool $allowSpot = true ]) : string

When DeviceCMYK forcing is enabled, process colors are emitted as CMYK operators to avoid DeviceRGB output in restrictive PDF/X modes.

Parameters

  • $color : string: Color name, hex value, or spot() CSS function.
  • $stroke : bool = false: If true return the stroking color operator, otherwise the non-stroking one.
  • $tint : float = 1: Tint value in the range 0-1 applied to spot colors.
  • $allowSpot : bool = true: True to resolve (and register) spot colors, false to force a device color.

Return values

string —

PDF color operator string.

hasEmittedDeviceCmyk()

File: PdfColor.php line 63

public hasEmittedDeviceCmyk() : bool

Return values

bool

isForceDeviceCmyk()

File: PdfColor.php line 205

public isForceDeviceCmyk() : bool

Return values

bool

setForceDeviceCmyk()

File: PdfColor.php line 197

public setForceDeviceCmyk(bool $enabled) : void

Parameters

  • $enabled : bool