|
|
@@ -56,23 +56,4 @@ class PdfEncoder implements EncoderInterface
|
|
|
|
|
|
return $this->knpSnappy->getOutputFromHtml($html, $options);
|
|
|
}
|
|
|
-
|
|
|
- /**
|
|
|
- * Encode the given HTML content into PDF,
|
|
|
- * write it into a file at the given location,
|
|
|
- * and returns the file path
|
|
|
- *
|
|
|
- * @param string $html
|
|
|
- * @param string $path
|
|
|
- * @param array $options
|
|
|
- * @return string
|
|
|
- */
|
|
|
- public function encodeToFile(string $html, string $path, array $options = []): string
|
|
|
- {
|
|
|
- $options = array_merge($this->defaultOptions, $options);
|
|
|
-
|
|
|
- $this->knpSnappy->generateFromHtml($html, $path, $options);
|
|
|
-
|
|
|
- return $path;
|
|
|
- }
|
|
|
}
|