Aspose.Diagram Cloud SDK for Swift
Swift REST API to Create, Manage & Export Visio Diagrams
A Powerful Swift REST SDK enables Software Developers to Generate, Edit, Render, Manipulate and Convert Visio Diagrams Formats like VSD, VSDX, VSS, VSSX, VST & more in Cloud.
Swift is a versatile and powerful programming language, and when it comes to document manipulation and management, having the right SDK can make all the difference. Aspose, a leader in document processing and manipulation APIs and applications, has introduced the Aspose.Diagram Cloud SDK for Swift a game-changer for software developers working with Microsoft Visio diagram files. It offers a seamless solution for working with diagrams inside your Swift applications.
The Aspose.Diagram Cloud SDK for Swift is a software development kit that provides Swift developers with a convenient way to work with diagram files. It's designed to be user-friendly and powerful, allowing software developers to perform various operations on diagram files without the need for complex code or extensive manual effort. The SDK enables software developers to work with Microsoft Visio diagrams in various ways, such as creating diagrams from scratch, modifying existing diagrams, conversion of diagrams to different file formats, high-quality diagram rendering, manipulating existing diagrams and so on.
The Aspose.Diagram Cloud SDK for Swift seamlessly integrates with cloud storage, allowing users to store and retrieve diagrams from cloud services like Amazon S3, Google Cloud Storage, or others. It is a valuable addition to the toolkit of any developer who needs to work with diagrams in their Swift applications. With its wide range of features and user-friendly integration, it simplifies the process of diagram creation, editing, and conversion. In the ever-evolving landscape of software development, having the right tools can significantly impact your productivity and the quality of your projects. Aspose.Diagram Cloud SDK for Swift is a testament to the commitment of Aspose in providing top-notch solutions for developers.
Getting Started with Aspose.Diagram Cloud SDK for Swift
The recommend way to install Aspose.Diagram Cloud SDK for Swift is using CocoaPods. Please use the following command for a smooth installation.
Install Aspose.Diagram Cloud SDK for Swift via CocoaPods
target 'MyApp' do
pod 'AsposeDiagramCloud', '~> 20.3'
end
You can also download it directly from Aspose product page.Generate New Visio Diagram via Perl
Aspose.Diagram Cloud SDK for Swift enables Software developers to create new diagrams from scratch inside their Perl applications. The SDK provides various important functions for handling Visio diagrams, such as adding shapes to a diagram, using connectors, inserting text & other elements and various attributes to craft the perfect diagram with ease. The SDK makes it easy for developers to design custom diagrams that suit their specific needs. The following example demonstrates how software developers can create new VDX diagram inside Perl applications.
How to Create New VDX Diagram via Perl API?
# Get your ClientId and ClientSecret from https://dashboard.aspose.cloud (free registration required).
my $config = AsposeDiagramCloud::Configuration->new(app_sid => 'MY_CLIENT_ID', app_key => 'MY_CLIENT_SECRET');
my $client = AsposeDiagramCloud::ApiClient->new( $config);
my $diagram_api = AsposeDiagramCloud::DiagramApi->new($client);
my $result = $diagram_api->diagram_name_put(name => 'sample.vdx', folder => 'output', is_overwrite => 'true', storage => 'My_Storage_Name');
Visio Format Conversion via Swift API
The Aspose.Diagram Cloud SDK for Swift makes is easy for software developers to load and convert Microsoft Visio Diagrams to different file formats, making it easy to adapt your diagrams to various needs and platforms. This feature is particularly useful when you need to work with diagrams in different file formats. It supports conversion to numerous file formats, such as PDF, XPS, HTML, XAML, SWF, JPEG, PNG, BMP, TIFF, SVG, EMF and many more. The following Swift code example shows how to convert Visio diagram to another format.
How to Convert Visio Diagram to Other File Format via Swift Code?
import AsposeDiagramCloud
// Initialize the Configuration
let configuration = Configuration(apiKey: "yourAPIKey")
// Create a DiagramApi instance
let diagramApi = DiagramApi(configuration: configuration)
// Define the input file name (Visio diagram)
let fileName = "yourDiagramFileName.vsdx"
// Define the output file name (PDF)
let outputFileName = "output.pdf"
// Define the output format
let format = "pdf"
// Convert the Visio diagram to PDF
diagramApi.diagramConvertToFormat(fileName: fileName, format: format, outputFileName: outputFileName) { (response, error) in
if let error = error {
print("Error: \(error)")
} else {
if let data = response {
// Save or process the converted file (PDF in this case)
// For example, save it to a local file
if let fileData = Data(base64Encoded: data) {
let outputPath = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0].appendingPathComponent(outputFileName)
do {
try fileData.write(to: outputPath)
print("Conversion successful. Output file saved at: \(outputPath.path)")
} catch {
print("Error saving the output file: \(error)")
}
} else {
print("Error: Unable to decode the response data.")
}
} else {
print("Error: No response data received.")
}
}
}
Extract Data from Visio Diagrams via Swift API
Aspose.Diagram Cloud SDK for Swift is a powerful tool that allows developers to extract data from Visio diagrams in a straightforward and efficient manner inside Swift applications. With this SDK, you can access and parse Visio diagrams, retrieving essential information, shapes, and properties to work with the data as needed. It support extraction of shapes, text, and metadata, for further analysis or integration into other applications. Moreover, the SDK enables the manipulation of shapes within diagrams, allowing software developers to reposition, resize, and style shapes as needed.
Visio Diagrams Rendering
High-quality rendering is crucial for creating professional diagrams. Aspose.Diagram Cloud SDK for Swift ensures that your diagrams appear crisp and clear, whether on a web application or in a print document. The SDK is designed to work on various platforms, making it versatile for your Swift applications.