Skip to content

Instantly share code, notes, and snippets.

@groupdocs-com-kb
Last active April 22, 2025 02:47
Convert RTF to JPG using Node.js. For more information, please follow link: https://kb.groupdocs.com/conversion/nodejs/convert-rtf-to-jpg-using-nodejs/
const conversion = require('@groupdocs/groupdocs.conversion')
const licensePath = "GroupDocs.Conversion.lic";
const license = new conversion.License()
license.setLicense(licensePath);
// Load the input RTF file
const converter = new conversion.Converter("input.rtf");
// Set the convert options for Jpg format
const options = new conversion.ImageConvertOptions();
options.setFormat(conversion.ImageFileType.Jpg);
// Save output Jpg to disk
converter.convert("output.jpg", options);
console.log('The end of process.');
process.exit(0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment