Changeset 902 for trunk/Packages/Common/Pdf.php
- Timestamp:
- Feb 18, 2021, 1:59:28 PM (4 years ago)
- File:
-
- 1 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 }
Note:
See TracChangeset
for help on using the changeset viewer.