◆ __construct()
| ilHtmlToPdfTransformerFactory::__construct |
( |
string |
$component = '' | ) |
|
◆ createOneFileFromArray()
| ilHtmlToPdfTransformerFactory::createOneFileFromArray |
( |
array |
$src | ) |
|
|
protected |
Definition at line 88 of file class.ilHtmlToPdfTransformerFactory.php.
88 : string
89 {
90 $tmp_file = dirname(reset($src)) . '/complete_pages_overview.html';
91 $html_content = '';
94 $html_content .= file_get_contents(
$filename);
95 }
96 }
97 file_put_contents($tmp_file, $html_content);
98 return $tmp_file;
99 }
References $filename.
◆ deliverPDF()
| ilHtmlToPdfTransformerFactory::deliverPDF |
( |
string |
$file, |
|
|
string |
$delivery_type |
|
) |
| |
|
protected |
Definition at line 72 of file class.ilHtmlToPdfTransformerFactory.php.
73 {
74 if (file_exists($file)) {
75 if (strtoupper($delivery_type) === self::PDF_OUTPUT_DOWNLOAD) {
77 } elseif (strtoupper($delivery_type) === self::PDF_OUTPUT_INLINE) {
79 } elseif (strtoupper($delivery_type) === self::PDF_OUTPUT_FILE) {
80 return $file;
81 }
82 return $file;
83 }
84
85 return false;
86 }
static deliverFileLegacy(string $a_file, ?string $a_filename=null, ?string $a_mime=null, ?bool $isInline=false, ?bool $removeAfterDelivery=false, ?bool $a_exit_after=true)
References ilFileDelivery\deliverFileLegacy().
Referenced by deliverPDFFromHTMLString().
◆ deliverPDFFromHTMLString()
| ilHtmlToPdfTransformerFactory::deliverPDFFromHTMLString |
( |
string |
$src, |
|
|
string |
$output, |
|
|
string |
$delivery_type, |
|
|
string |
$service, |
|
|
string |
$purpose |
|
) |
| |
- Exceptions
-
Definition at line 53 of file class.ilHtmlToPdfTransformerFactory.php.
54 {
58
59 if (basename($output) === $output) {
61 }
62
64 $job->setFilename($output);
65 $job->addPage($src);
66 $job->setOutputMode($delivery_type);
67
69 return $this->
deliverPDF($output, $delivery_type);
70 }
static getRendererInstance(string $renderer)
static getRendererConfig(string $service, string $purpose, string $renderer)
static getRendererMapForPurpose(string $service, string $purpose)
References $config, $service, deliverPDF(), generateTempPath(), ilPDFGeneratorUtils\getRendererConfig(), ilPDFGeneratorUtils\getRendererInstance(), and ilPDFGeneratorUtils\getRendererMapForPurpose().
◆ generateTempPath()
| ilHtmlToPdfTransformerFactory::generateTempPath |
( |
string |
$output | ) |
|
|
protected |
◆ $lng
◆ PDF_OUTPUT_DOWNLOAD
| const ilHtmlToPdfTransformerFactory::PDF_OUTPUT_DOWNLOAD = 'D' |
|
private |
◆ PDF_OUTPUT_FILE
| const ilHtmlToPdfTransformerFactory::PDF_OUTPUT_FILE = 'F' |
|
private |
◆ PDF_OUTPUT_INLINE
| const ilHtmlToPdfTransformerFactory::PDF_OUTPUT_INLINE = 'I' |
|
private |
The documentation for this class was generated from the following file: