1. Products
  2.   Diagram
  3.   PHP
  4.   Aspose.Diagram Cloud SDK for PHP

Aspose.Diagram Cloud SDK for PHP

 
 

PHP 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 & more programmatically.

In today's fast-paced digital world, effective communication is key to success in any business or organization. Visual communication, in particular, plays a crucial role in conveying complex information quickly and efficiently. Diagrams and flowcharts are some of the most effective tools for visualizing ideas, processes, and data. Aspose.Diagram Cloud SDK for PHP is a powerful library that empowers PHP developers to harness the potential of visual communication in their applications. Let’s explore its key features, and how it can benefit developers and businesses alike.

Aspose.Diagram Cloud SDK for PHP is a powerful diagraming library that allows PHP developers to work with Microsoft Visio file formats inside their applications. It is a renowned library for working with Microsoft Visio files, offering a wide range of capabilities for creating, editing, and manipulating diagrams. The library has included support for loading and exporting Microsoft Visio files (VSDX, VSX, VTX, VDX, VSSX, VSTX, VSDM, VSSM, VSTM) to various popular file formats, like PDF, HTML, XPS, SWF, XAML, images (BMP, JPEG, TIFF, EMF, SVG & PNG) and many more.

Cloud-based SDKs like Aspose.Diagram Cloud SDK for PHP bring the functionality enabling PHP developers as well as applications, to integrate diagram management directly into their software applications with ease. With the flexibility, scalability, and cost-efficiency of cloud-based APIs, you can create, edit, and manipulate diagrams with ease. Embrace the future of software development by exploring the potential of the SDK in your PHP projects. Whether you need to generate complex flowcharts, organizational charts, or network diagrams, Aspose.Diagram simplifies the process.

Previous Next

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.

 English