In this article, you will learn how to convert SVG to PNG programmatically and using free online SVG to PNG converter.
Created
March 27, 2023 03:44
SVG to PNG Converter – (Online & Free)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment