Load Note document with options

GroupDocs.Conversion provides the NoteLoadOptions class to give you better control over how the source Note document will be processed. The following options could be set:

  • setDefaultFont specifies a default font for Note document. The specified font will be used if a font is missing.
  • setFontSubstitutes specifies substitutes specific fonts from the Note document.
  • setPassword specifies a password to unlock the protected document.

Specify font substitution

The following code snippet shows how to convert a Note document and specify font substitution for missing fonts:

import com.groupdocs.conversion.Converter;
import com.groupdocs.conversion.contracts.FontSubstitute;
import com.groupdocs.conversion.options.convert.PdfConvertOptions;
import com.groupdocs.conversion.options.load.NoteLoadOptions;
import java.util.ArrayList;
import java.util.List;
...
NoteLoadOptions loadOptions = new NoteLoadOptions();

List<FontSubstitute> fontSubstitutes = new ArrayList<FontSubstitute>();
fontSubstitutes.add(FontSubstitute.create("Tahoma", "Arial"));
fontSubstitutes.add(FontSubstitute.create("Times New Roman", "Arial"));
loadOptions.setFontSubstitutes(fontSubstitutes);
loadOptions.setDefaultFont("Helvetica");

Converter converter = new Converter("sample.one", loadOptions);
PdfConvertOptions options = new PdfConvertOptions();
converter.convert("converted.pdf", options);