This documentation explains how to load Note documents, such as OneNote files, using GroupDocs.Conversion for Java with NoteLoadOptions class. The API allows developers to specify parameters for processing Note documents, including page ranges and rendering settings, enabling precise control over conversion to formats like PDF, PNG, or DOCX. The following options could be set:
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:
importcom.groupdocs.conversion.Converter;importcom.groupdocs.conversion.contracts.FontSubstitute;importcom.groupdocs.conversion.options.convert.WordProcessingConvertOptions;importcom.groupdocs.conversion.options.load.NoteLoadOptions;importjava.util.ArrayList;importjava.util.List;publicclassConvertNoteBySpecifyingFontSubstitution{publicstaticvoidconvert(){NoteLoadOptionsloadOptions=newNoteLoadOptions();List<FontSubstitute>fontSubstitutes=newArrayList<FontSubstitute>();fontSubstitutes.add(FontSubstitute.create("Calibri","Arial"));fontSubstitutes.add(FontSubstitute.create("Times New Roman","Arial"));loadOptions.setFontSubstitutes(fontSubstitutes);try(Converterconverter=newConverter("sample.one",()->loadOptions)){PdfConvertOptionsoptions=newPdfConvertOptions();converter.convert("converted_with_font_substitution.pdf",options);}}publicstaticvoidmain(String[]args){convert();}}
sample.one is sample file used in this example. Click here to download it.
converted_with_font_substitution.pdf is converted PDF document. Click here to download it.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.