iink SDK on Device

Answered

How to use Editor.Export with a special ParameterSet

The Editor class has a function export_ which takes a ParameterSet as a parameter to override the current Editor configuration.

However, I can't figure out how it is supposed to be used.

I tried creating a new ParameterSet to use there, but the constructor for ParameterSet is not public.

All I can find is to use Editor.getConfiguration which returns a reference to the Editor's current configuration. However, it doesn't seem to be possible to clone that configuration to use as a special configuration for Export. So the option left that I can see is to modify that configuration, but if we're changing the Editor's configuration anyway, we don't need to pass that configuration again to export_.

I must be missing something, so please let me know how I can pass my own ParameterSet to export_ without changing the Editor's current configuration.

Thank you!


Best Answer

Dear Nicolas,


thank you for contacting us.


Please find a code sample that shows how to use the ParameterSet:

ParameterSet paramSet = editorView.getEditor().getEngine().createParameterSet();
paramSet.setBoolean("text.guides.enable", true);
paramSet.setString("text.configuration.name", "text");
String exporText = editorView.getEditor().export_(null, MimeType.JIIX, paramSet);



Best regards,


Olivier

1 Comment

Answer

Dear Nicolas,


thank you for contacting us.


Please find a code sample that shows how to use the ParameterSet:

ParameterSet paramSet = editorView.getEditor().getEngine().createParameterSet();
paramSet.setBoolean("text.guides.enable", true);
paramSet.setString("text.configuration.name", "text");
String exporText = editorView.getEditor().export_(null, MimeType.JIIX, paramSet);



Best regards,


Olivier