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

How to create a new docs file #30

Open
ChiuSky opened this issue Jun 13, 2022 · 1 comment
Open

How to create a new docs file #30

ChiuSky opened this issue Jun 13, 2022 · 1 comment

Comments

@ChiuSky
Copy link

ChiuSky commented Jun 13, 2022

I try to create a new doc file, but when I invoke DocxTemplate.fromBytes(await f.readAsBytes()), get error
[VERBOSE-2:ui_dart_state.cc(198)] Unhandled Exception: FormatException: Could not find End of Central Directory Record
here is my code

final f = await LLCFileUtil.getLocalFile('test', 'template.docx');
    if (!f.existsSync()) {
      f.createSync();
    }
    final byte = await f.readAsBytes();
    final docx = await DocxTemplate.fromBytes(byte);

and the f.path was /var/mobile/Containers/Data/Application/AB671DDF-9D0E-4B40-B7A9-2252E71F433E/Documents/test/template.docx

@kekko7072
Copy link

+1

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

No branches or pull requests

2 participants