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

Read a file content from a variable #2428

Open
lorenzo80 opened this issue Jul 29, 2023 · 1 comment
Open

Read a file content from a variable #2428

lorenzo80 opened this issue Jul 29, 2023 · 1 comment

Comments

@lorenzo80
Copy link

I've spent the last hours trying to solve that, to no avail.

We are receiveing email with ODT attachments.
The info we are looking for are inside the ODTs, but due to GDPR we cannot save them.

There is no issue to get the attachment content and store it into a variable, but how can I use PHPWord to elaborate it?
IOFactory::load looks like the only way to operate, but it definitely requires a path to a file.

Is there a way to do that without saving to a temporary file (and again, we simply can't do that)?

@thomasb88
Copy link

ODT files are xml files wrapped into a zip file container.
The ODT files are read from PhpWord\Reader\ODText.php, using the load function.

Which mean you might have to creater a new reader (like ODTStreamText for example).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants