
Aspose.Diagram Cloud SDK for PHP
PHP REST API to Create, Edit & Convert Visio Diagrams
A Powerful PHP Diagraming Library for Creating, Editing, Manipulating & Convert Microsoft Visio File Formats including VSD, VSDX, VSS, VSSX, VST & Extract Info from it programmatically.
In today’s fast-moving world, good communication is vital for success in any business or organization. Visual communication is especially important as it helps convey complex information in a quick and efficient way. Diagrams and flowcharts are great tools for visualizing ideas, processes, and data. With the Aspose.Diagram Cloud SDK for PHP software developers can tap into the power of visual communication in their apps. Let’s explore its key features, and how it can benefit developers and businesses alike. With this SDK, you can load and export Microsoft Visio files (VSDX, VSX, VTX, VDX, VSSX, VSTX, VSDM, VSSM, VSTM) into different formats such as PDF, HTML, XPS, SWF, XAML, images (BMP, JPEG, TIFF, EMF, SVG & PNG) and many more.
The Aspose.Diagram Cloud SDK for PHP is a robust tool for developers using PHP. It enables you to handle Microsoft Visio files within your applications. This library is well-known for its features in creating, editing, and managing diagrams. Cloud-based SDKs, such as Aspose.Diagram Cloud SDK for PHP, offer PHP developers and applications the tools to easily incorporate diagram management directly into their software. By using cloud-based APIs, you can effortlessly create, edit, and handle diagrams. Embrace the forward-thinking approach to software development by discovering how this SDK can enhance your PHP projects. If you have to create detailed flowcharts, organization charts, or network diagrams, Aspose.Diagram makes it easy for you.
Getting Started with Aspose.Diagram Cloud SDK for PHP
The recommend way to install Aspose.Diagram Cloud SDK for PHP is using Composer. Please use the following command for a smooth installation.
Install Aspose.Diagram Cloud SDK for PHP via Composer
composer require aspose/diagram-sdk-php
You can also download it directly from Aspose product page.Create New Visio Diagram via PHP API
Aspose.Diagram Cloud SDK for PHP makes it easy for software developers to create and manage new Visio diagrams inside their own PHP applications. The SDK provides comprehensive support for working with Microsoft Visio files, including VSD, VSDX, VSS, VSSX, and VST formats. Software developers can create new diagrams from scratch or modify existing ones, allowing for dynamic diagram generation and customization. It ensures compatibility with different Visio formats, eliminating the need for users to install specific software to view or edit diagrams. The following example demonstrates how software developers can programmatically create a new Microsoft Visio diagram file inside their own PHP applications with ease.
How to Create New Visio VDX Diagram using PHP REST API?
// Get your ClientId and ClientSecret from https://dashboard.aspose.cloud (free registration required).
$api = new DiagramApi("client_credentials", "MY_CLIENT_ID", "MY_CLIENT_SECRET");
$result = $api->createNew("sample.vdx");
Visio Diagram to Other Formats Export via PHP
Aspose.Diagram Cloud SDK for PHP is a useful and well-organized solution that enables software developers to open and convert Microsoft Visio diagrams to numerous other file formats inside their own PHP applications. The SDK supports converting Visio diagrams to various formats, such as PDF, XPS, SWF, image formats (JPEG, PNG, BMP), and HTML, making it easy to share diagrams in different forms. The SDK can automate repetitive tasks related to diagram handling, allowing them to focus on more complex aspects of their applications.
Convert Visio Diagram to Other Supported File Formats via PHP API?
require_once(__DIR__ . '/vendor/autoload.php');
require_once(__DIR__ . '/Utils.php');
use Aspose\Diagram\Cloud\Api\DiagramFileApi;
use \Aspose\Diagram\Cloud\Configuration;
use \Aspose\Diagram\Cloud\Model;
use \Aspose\Diagram\Cloud\ObjectSerializer;
class DiagramFile {
public $diagramApi;
public function __construct() {
$this->diagramApi = new DiagramFileApi();
$config = $this->diagramApi->getConfig();
$token = Utils::getAccessToken();
$config ->setAccessToken($token);
}
public function saveFileAsAnotherFormat() {
$fileName ='file_get_1.vdx';
$isOverwrite = 'true';
$folder= "";
$format = new \Aspose\Diagram\Cloud\Model\FileFormatRequest();
$format->setFormat("pdf");
$newfilename = "file_saveas_php.pdf";
$result = $this->diagramApi->DiagramFilePostSaveAs($fileName, $format, $newfilename, $folder, $isOverwrite);
$json = json_decode($result);
print_r ( $json );
}
}
$diagramFile = new DiagramFile();
$diagramFile->saveFileAsAnotherFormat();
Extracting Diagram Information via PHP
Aspose.Diagram Cloud SDK for PHP has included complete support for loading and extracting information from a Visio diagram inside PHP applications. Software developers can extract valuable information from diagrams with just a couple of lines of PHP code. It support various features for handling extraction, such as 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.