import com.groupdocs.conversion.Converter;
import com.groupdocs.conversion.licensing.License;
import com.groupdocs.conversion.options.convert.PdfConvertOptions;

public class ConvertMppToPdfInJava {
    public static void main(String[] args) { // Main function to convert MPP to PDF in Java
        // Remove the watermark in output PDF document by adding license
        License lic = new License();
        lic.setLicense("GroupDocs.Conversion.lic");

        // Load the source MPP file for conversion to PDF
        Converter converter = new Converter("sample.mpp");

        // Set the convert options for PDF format
        PdfConvertOptions options = new PdfConvertOptions();

        // Convert and save the MPP in PDF format
        converter.convert("converted.pdf", options);

        System.out.println("Done");
    }
}