-
Notifications
You must be signed in to change notification settings - Fork 279
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
custome html format #41
Comments
Could you please check if it's possible to do so using LibreOffice or Apache OpenOffice without JOConverter ? If the anwser is yes, then there is a way to do it with JODConverter. Could you also check if #16 is somehow what you are trying to do?? |
Hey , i have found the option to set the charset for html in libreoffice gui. |
Can you please tell me where is this option in the LibreOffice GUI ? I didn't find it. Also, the custom registry you built will only be able to load and save file from/to html. And the charset you uses will only be applied when loading an html document. Can you please tell me what is the format of the source document you try to convert to HTML ? |
This is the Page about the option .https://help.libreoffice.org/Common/HTML_compatibility |
And another quertion about MS Office to .html. |
You have to set the templateProfileDir to the path of the user directory you configured if you want these settings to be applied while using JODConverter. Here on my Windows, after settings LibreOffice to suit my needs (using the GUI), I copied the directory LocalOfficeManager.builder()
.templateProfileDir("C:\\JodConverter\\LO\\templateProfile")
.install()
.build(); I search a lot for your second question and found that it is possible to embed the images using an option with the HTML format filter. Here's a working example: final File input = new File("input.doc");
final File output = new File("output.html");
final DocumentFormat format = DocumentFormat.copy(DefaultDocumentFormatRegistry.HTML);
format.getStoreProperties(DocumentFamily.TEXT).put("FilterOptions", "EmbedImages");
JodConverter.convert(input).to(output).as(format).execute(); |
Note that with my latest commit, the DocumentFormat must be created this way: final File input = new File("input.doc");
final File output = new File("output.html");
final DocumentFormat format =
DocumentFormat.builder()
.from(DefaultDocumentFormatRegistry.HTML)
.storeProperty(DocumentFamily.TEXT, "FilterOptions", "EmbedImages")
.build();
JodConverter.convert(input).to(output).as(format).execute(); |
Do you try it in jodconverter Online module ?
and it still create html file by useing |
LibreOffice /Collabora Online only supports conversion "as is". You cannot customize it using filters or custom load/store properties (as far as I know). Maybe they will in the future but for now, the JODConverer Online module only uses the "extension" part of the DocumentFormat in order to build the required URL to execute the conversion. See Using the Collabora Online / LibreOffice Online without JODConverter for more info. |
OK,i will consider using a springboot-jodconverter with libreoffice(local) for compromise plan |
Note that I've uploaded a new sample rest api that can be used with the jodconverter-online module as client. Using this sample as server, this would work. This is just a sample though... |
@sbraconnier Thank you so much for doing this.I truely need it . |
Just tried |
Can i control the jodconverter convert some file to .html that the format is what i want.
Such as charset=gb2312 i need utf-8.
Sorry foy my bad English
The text was updated successfully, but these errors were encountered: