Watermark
    
            
            in package
            
        
    
    
    
Tags
Table of Contents
Constants
- FONT = 'freesansb'
 - FONT_SIZE_DIAGONAL = 32
 - FONT_SIZE_HORIZONTAL = 8
 - TAG_FONT = 'times'
 
Properties
- $authService : AuthenticationService
 - $remoteAddress : string
 - $watermarkConfig : array<string|int, mixed>
 
Methods
- __construct() : mixed
 - watermarkPdf() : string
 - calculateTextAngle() : array{0: float, 1: float}
 - Calculate the angle at which the watermark text will be displayed.
 - getWatermarkText() : string
 - Uses the identity of the user when signed in or the IP address from which the download is performed.
 
Constants
FONT
    private
        mixed
    FONT
    = 'freesansb'
    
    
    
    
FONT_SIZE_DIAGONAL
    private
        mixed
    FONT_SIZE_DIAGONAL
    = 32
    
    
    
    
FONT_SIZE_HORIZONTAL
    private
        mixed
    FONT_SIZE_HORIZONTAL
    = 8
    
    
    
    
TAG_FONT
    private
        mixed
    TAG_FONT
    = 'times'
    
    
    
    
Properties
$authService read-only
        private
            AuthenticationService
    $authService
    
    
    
    
    
    
$remoteAddress read-only
        private
            string
    $remoteAddress
    
    
    
    
    
    
$watermarkConfig read-only
        private
            array<string|int, mixed>
    $watermarkConfig
    
    
    
    
    
    
Methods
__construct()
    public
                    __construct(AuthenticationService $authService, string $remoteAddress, array<string|int, mixed> $watermarkConfig) : mixed
    Parameters
- $authService : AuthenticationService
 - $remoteAddress : string
 - $watermarkConfig : array<string|int, mixed>
 
Tags
watermarkPdf()
    public
                    watermarkPdf(string $path, string $fileName[, bool $scanned = false ]) : string
    Parameters
- $path : string
 - 
                    
The CFS path of the file to watermark
 - $fileName : string
 - $scanned : bool = false
 
Return values
string —The CFS path of the watermarked file
calculateTextAngle()
Calculate the angle at which the watermark text will be displayed.
    private
                    calculateTextAngle(float|int $width, float|int $height) : array{0: float, 1: float}
    Parameters
- $width : float|int
 - $height : float|int
 
Return values
array{0: float, 1: float}getWatermarkText()
Uses the identity of the user when signed in or the IP address from which the download is performed.
    private
                    getWatermarkText() : string
    Return values
string —The text containing details on the user who performs the download