Skip to content

Instantly share code, notes, and snippets.

SVG to PNG Converter – (Online & Free)
// Prepare convert settings
ConvertSettings settings = new ConvertSettings();
settings.setFilePath("java-testing/input-sample-file.svg");
settings.setFormat("png");
settings.setOutputPath("java-testing/output-sample-file.png");
// convert to specified format
List<StoredConvertedResult> response = apiInstance.convertDocument(new ConvertDocumentRequest(settings));
System.out.println("Document converted successfully: " + response);
# Create necessary API instances
convert_api = groupdocs_conversion_cloud.ConvertApi.from_keys(client_id, client_secret)
# Prepare convert settings
settings = groupdocs_conversion_cloud.ConvertSettings()
settings.file_path = "python-testing/sample-file.svg"
settings.format = "png"
settings.output_path = "python-testing"
# Convert document request
request = groupdocs_conversion_cloud.ConvertDocumentRequest(settings)
# convert to specified format
result = convert_api.convert_document(request)
print("Document converted: " + result[0].path)

In this article, you will learn how to convert SVG to PNG programmatically and using free online SVG to PNG converter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment