Changeset 902 for trunk/Packages/Common
- Timestamp:
- Feb 18, 2021, 1:59:28 PM (4 years ago)
- Location:
- trunk/Packages/Common
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/Pdf.php
r901 r902 4 4 { 5 5 public bool $Checked = false; 6 public string $BorderTop = ''; 7 public string $BorderLeft = ''; 8 public string $BorderRight = ''; 9 public string $BorderBottom = ''; 10 public int $FontSize = 0; 11 public string $OutputFormat = 'pdf'; 12 public string $Charset = '8859-2'; 6 13 7 14 function GenerateHTML(): string … … 24 31 } else throw new Exception('htmldoc is not installed.'); 25 32 } 33 $Parameters = '--no-numbered --footer . --webpage --no-embedfonts --charset '.$this->Charset.' -t '.$this->OutputFormat; 34 if ($this->FontSize > 0) $Parameters .= ' --fontsize '.$this->FontSize; 35 if ($this->BorderLeft != '') $Parameters .= ' --left '.$this->BorderLeft; 36 if ($this->BorderTop != '') $Parameters .= ' --top '.$this->BorderTop; 37 if ($this->BorderRight != '') $Parameters .= ' --right '.$this->BorderRight; 38 if ($this->BorderBottom != '') $Parameters .= ' --bottom '.$this->BorderBottom; 26 39 $Output = shell_exec('echo "'.addslashes($Encoding->FromUTF8($HtmlCode)). 27 '"|htmldoc --no-numbered --webpage --no-embedfonts --charset 8859-2 -t pdf-');40 '"|htmldoc '.$Parameters.' -'); 28 41 return $Output; 29 42 } -
trunk/Packages/Common/PrefixMultiplier.php
r874 r902 72 72 class PrefixMultiplier 73 73 { 74 function TruncateDigits($Value, $Digits = 4) 74 function TruncateDigits($Value, $Digits = 4): string 75 75 { 76 76 for ($II = 2; $II > -6; $II--) … … 87 87 } 88 88 89 function Add($Value, $Unit, $Digits = 4, $PrefixType = 'Decimal') 89 function Add($Value, $Unit, $Digits = 4, $PrefixType = 'Decimal'): string 90 90 { 91 91 global $PrefixMultipliers;
Note:
See TracChangeset
for help on using the changeset viewer.