mirror of
https://github.com/nextcloud/richdocuments.git
synced 2025-12-18 05:20:43 +01:00
feat: add pdf output format to document generation provider
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
This commit is contained in:
parent
0f4b35c237
commit
785c9ef74d
1 changed files with 2 additions and 1 deletions
|
|
@ -64,6 +64,7 @@ class TextToDocumentProvider implements ISynchronousProvider {
|
|||
'target_format' => [
|
||||
new ShapeEnumValue($this->l->t('OpenXML (docx)'), 'docx'),
|
||||
new ShapeEnumValue($this->l->t('OpenDocument (odt)'), 'odt'),
|
||||
new ShapeEnumValue($this->l->t('Portable Document Format (pdf)'), 'pdf'),
|
||||
],
|
||||
];
|
||||
}
|
||||
|
|
@ -98,7 +99,7 @@ class TextToDocumentProvider implements ISynchronousProvider {
|
|||
}
|
||||
|
||||
$targetFormat = self::DEFAULT_TARGET_FORMAT;
|
||||
if (isset($input['target_format']) && is_string($input['target_format']) && in_array($input['target_format'], ['docx', 'odt'], true)) {
|
||||
if (isset($input['target_format']) && is_string($input['target_format']) && in_array($input['target_format'], ['docx', 'odt', 'pdf'], true)) {
|
||||
$targetFormat = $input['target_format'];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue