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

Aspose.CAD Cloud SDK for PHP

 
 

PHP REST API to Create, Edit & Convert CAD Drawings

A Powerful PHP CAD Drawings Processing SDK that enabels software developers to open, load, read, manipulate, scale, protect, & convert AutoCAD DWG, DXF DWF and BIM Files.

Aspose.CAD Cloud SDK for PHP is an advanced and versatile software development kit (SDK) that enables developers to work with AutoCAD and BIM drawings using PHP language. The API supports CAD drawings creation and management in various file formats such as DWG, DXF, DWF, DWT, STL, IGS, DGN, OBJ, CF2, and many more without installing any additional software or tools. Aspose.CAD Cloud SDK for PHP is a cost-effective solution that eliminates the need for expensive CAD software licenses. The SDK can be used on any platform that supports PHP, including Windows, Linux, and macOS.

Aspose.CAD Cloud SDK for PHP has included a wide range of features that make it a valuable tool for software developers for working with AutoCAD drawings. It supports features like generating CAD drawings, modifying CAD entities (lines, circles, and arcs.), rendering CAD files to various image formats, exporting CAD drawings using request body, flipping or rotating AutoCAD images, converting AutoCAD DWG File to PDF, resizing or scaling AutoCAD drawing images, get properties of an image, and many more. Software developers can easily protect their CAD files by adding passwords, encryption, or digital signatures.

The SDK provides a set of APIs that allow developers to create, modify, and convert CAD files without the need for any additional software or tools. It provides complete support for exporting AutoCAD drawings such as DWG, DWF, and DXF to some popular file formats such as PDF, BMP, PNG, JPG, JPEG, JPEG2000, TIF, TIFF, PSD, GIF, WMF, DXF, and many more. It can be used to manipulate and process CAD files for architectural and engineering projects. The SDK offers a range of features that help developers automate time-consuming tasks, such as file format conversion and rendering. The SDK offers a wide range of features and benefits that make it a valuable tool for developers in various industries.

Previous Next

Getting Started with Aspose.CAD Cloud SDK for PHP

The recommend way to install Aspose.CAD Cloud SDK for PHP is using composer. To work with Aspose.CAD Cloud SDK for PHP, you need to have PHP 5.6 or later. Run the following command to add the Aspose Cloud SDK for PHP to your project.

Install Aspose.CAD Cloud SDK for PHP via Composer

composer require aspose/cad-cloud-sdk-php 
You can also download it directly from Aspose product page.

CAD Drawings Conversion to PDF via PHP API

Aspose.CAD Cloud SDK for PHP has included a very useful feature for converting AutoCAD drawings to Portable Document Format (PDF) with just a couple of lines of PHP code. The library also included support for exporting the existing image to PDF format or exporting the existing image to another format (JPG, BMP, PSD, TIFF, GIF, PNG,J2K, WMF) where the Image is passed as a request body. The following example demonstrates how PHP developers can Export existing drawings to PDF format using PHP commands.

Export Existing Drawing to PDF via PHP API

storage->PutCreate($putRequest);

$request = new \Aspose\CAD\Model\Requests\GetDrawingResizeRequest($remoteName, $outputFormat, 320, 240, $folder=trim(self::$baseRemoteFolder . $subfolder));

list($response, $code, $headers) = $this->CAD->getDrawingResizeWithHttpInfo($request);
Assert::assertEquals(200, $code);
}
?>

Rotate and Resize CAD Images via PHP API

Aspose.CAD Cloud SDK for PHP is a very useful CAD image manipulation SDK that enables software developers to open and rotate their CAD images inside their own PHP applications. The library has included very useful methods for loading existing CAD drawings, rotating or flips the CAD drawings, adjusting the size of drawing images, Image scaling support, and many more. The following example demonstrates how to rotate and flip an existing image using PHP code.

How to Rotate and Flip CAD Images via PHP API?

storage->PutCreate($putRequest);
$request = new \Aspose\CAD\Model\Requests\PostDrawingResizeRequest($file, $outputFormat, 320, 240, $folder=trim(self::$baseRemoteFolder . $subfolder, ""));

list($response, $code, $headers) = $this->CAD->postDrawingResizeWithHttpInfo($request);
Assert::assertEquals(200, $code);
}
?>

CAD Drawings Export to Raster Images via PHP

Most photos come in the raster file format, as it is one of the most widely used file formats whether they're print or digital. Raster images work best when users need to store and display high-quality photographs. Aspose.CAD Cloud SDK for PHP makes it easy for software developers to export CAD drawings to raster images with ease. The library supports CAD Drawings conversion to BMP, PNG, JPG, JPEG, JPEG2000, TIF, TIFF, PSD, GIF, and WMF formats. The following examples show how simply software developers can convert an existing drawing to another file format using the PHP command.

Export Existing Drawing to Another Format using PHP Commands

storage->PutCreate($putRequest);

$request = new \Aspose\CAD\Model\Requests\GetDrawingSaveAsRequest($remoteName, $outputFormat, $folder=trim(self::$baseRemoteFolder . $subfolder), null, null);

list($response, $code, $headers) = $this->CAD->getDrawingSaveAsWithHttpInfo($request);
Assert::assertEquals(200, $code);

}
?>