-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
pptx/docx not working in sandbox mode #8128
Comments
You're probably using a version of pandoc compiled without the |
Running in sandbox mode, pandoc can still use an ersatz file system stored in memory (which is populated at the outset with the files specified on the command line). But this doesn't include all of pandoc's data files. A couple of possibilities:
|
Thanks for the detailed and fast answer. From my point of view, this issue can be closed, as there exists a viable workaround. I see one additional possibility to address this:
|
I suppose another possibility would be to put the behavior under CPP, so that the data files are included in the ersatz file system only if pandoc is compiled without the Anyway, first step would be to measure the performance impact. Maybe it could be limited if we use lazy IO. I'll keep this open. |
Summary: Add the `-f embed_data_files` when building, because when running in `--sandbox` mode, `pandoc` cannot access the external file system. A similar case is presented in jgm/pandoc#8128. Test plan: Successfully ran and tested `python-pypandoc` and `apostrophe`. Signed-off-by: Gavin Zhao <git@gzgz.dev>
Summary: Add the `-f embed_data_files` when building, because when running in `--sandbox` mode, `pandoc` cannot access the external file system. A similar case is presented in jgm/pandoc#8128. Test plan: Successfully ran and tested `python-pypandoc` and `apostrophe`. Signed-off-by: Gavin Zhao <git@gzgz.dev>
Please do keep this open as I don't think Arch Linux plans on enabling the embeded data files option. As a distro we have several reasons for preferring not doing that, and it would be better if another resolution was found. |
The Problem:
When trying to convert to
.pptx
or.docx
with the--sandbox
flag enabled Pandoc dies with exitcode97
and the messageHow to Reproduce:
Filename:
test.md
Content:
# Heading\n\ntext\n
pandoc --sandbox -o test.pptx test.md
System Information:
native on Arch Linux
What I Assume About the Bug:
The
[Content_Types].xml
is a file required in the Open-Packaging Conventions (the underlying specification of Microsoft Office documents), it defines the types for file extensions in the ZIP archive.I generally can be static, as there are a limited amount of file types used for an Office document (I assume it is hardcoded in the respective writer module).
From my perspective, there is no reason this would not work in sandbox mode, as (if my assumption is correct) the
[Content_Types].xml
is not influenced by user input.What I'd Asume Happens:
Option 1: The Office file is created.
Option 2: (if there are valid reasons why this can't work in sandbox mode) A proper error message.
The text was updated successfully, but these errors were encountered: