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

The example program cannot convert html to a docx file #13

Open
22140505 opened this issue Oct 30, 2020 · 2 comments
Open

The example program cannot convert html to a docx file #13

22140505 opened this issue Oct 30, 2020 · 2 comments

Comments

@22140505
Copy link

I have Libreoffice installed and I can't find the ability to convert html to docx.

@arslanaybars
Copy link

Hey folks, 👋

There is a bug while converting from html to docx 🥺.

I solved it by modified ConvertWithLibreOffice.cs. I just change 89 Line foreach (var arg in commandArgs) { procStartInfo.ArgumentList.Add(arg); } to procStartInfo.Arguments = String.Join(" ", commandArgs);

Then it works for docx files as well. 🎉

@martinweihrauch I can create pr for this change. Thank you for this great library.

@gofal
Copy link
Contributor

gofal commented Jul 13, 2022

why should that fix html to docx conversion? your change is just about passing the commandargs to the process. The current method with Argumentlist.add is more save in case you have parametes containing empty strings. dotnet then handles that for you. in your situation, where you build up the arguments string yourself, then you have to care about arguments that do have empty spaces yourself, then you have to wrap them into quotation marks.

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

3 participants