Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Template Merging for ODT documents #2034

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

papoteur-mga
Copy link

Description

Merging document is currently only supported for Word documents. This request adds features for merging also ODT templates.
It adds also tests for them which pass in my local installation.
TemplateProcessor.php is kept, but some of its function are migrated to TemplateProssesorCommon when they can be common to ODT ones.
TemplateProcessorOdt.php is added which inherits also TemplateProssesorCommon. Functions are the same as for Word, but the class for the processor is TemplateProcessorOdt.

Checklist:

  • [ X ] The new code is covered by unit tests
  • I have updated the documentation to describe the changes

@papoteur-mga
Copy link
Author

See also issue #952

@troosan troosan added this to the v0.19.0 milestone Mar 13, 2021
@papoteur-mga
Copy link
Author

Hello,
Any hope for a review ?

@troosan troosan self-assigned this Apr 13, 2021
@papoteur-mga
Copy link
Author

Is there some news on this request?

@TBBH2I
Copy link

TBBH2I commented Sep 19, 2022

Hello,
is this version usable?

@papoteur-mga
Copy link
Author

Hello, is this version usable?

I hope so. I use it for my needs. I didn't have feedback, positive or negative, as you can see.

@efontainx
Copy link

efontainx commented Oct 14, 2022

This is exactly what I need, good job @papoteur-mga. It would be nice if it can be reviewed / merged.. @troosan @Progi1984

@Progi1984 Progi1984 removed this from the v1.0.0 milestone Nov 16, 2022
@PowerKiKi PowerKiKi changed the base branch from develop to master November 16, 2022 21:15
@kevinpapst
Copy link

Supporting an open format in the TemplateProcessor would be a huge benefit. @PowerKiKi @Progi1984 could you please share whether this has ay chance to make it into core? Just so we know whether we have to copy&paste that to our own code base or if we can help to push that forward instead.

@cavasinf
Copy link

Any update on this?

Saving the generated .docx file to .odt will create an empty file.

$templateProcessor->saveAs($path); // File is ok

$phpWord = \PhpOffice\PhpWord\IOFactory::load($path);
$phpWord->save($path, 'ODText'); // File is now Blank

Even using libreoffice/soffice cli to convert ends with errors.
libreoffice --headless --convert-to odt $path

Source file could not be loaded

@Progi1984 Progi1984 force-pushed the master branch 3 times, most recently from 2d9f999 to e458249 Compare August 30, 2023 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants