|
1 |
| -[Aspose.Diagram Cloud](https://products.aspose.cloud/Diagram) helps you develop diagrams manipulation applications. Our REST API based Diagram Cloud SDK allows your applications to work with Microsoft Visio Object Model. |
2 |
| - |
3 |
| -This repository contains Aspose.Diagram Cloud SDK source code. This SDK allows you to work with Aspose.Diagram Cloud REST APIs in your applications quickly and easily, with zero initial cost. |
4 |
| - |
5 |
| -To use this SDK, you will need App SID and App Key which can be looked up at [Aspose Cloud Dashboard](https://dashboard.aspose.cloud/#/apps) (free registration in Aspose Cloud is required for this). |
6 |
| - |
7 |
| - |
8 |
| -# Features |
9 |
| - |
10 |
| -### Support Import Formats |
11 |
| -* VSDX |
12 |
| -* VDX |
13 |
| -* VSD |
14 |
| -* VSX |
15 |
| -* VTX |
16 |
| -* VSSX |
17 |
| -* VSTX |
18 |
| -* VSDM |
19 |
| -* VSSM |
20 |
| -* VSTM |
21 |
| -* VDW |
22 |
| -* VSS |
23 |
| -* VST |
24 |
| - |
25 |
| -### Support Export Formats |
26 |
| -* VSDX |
27 |
| -* VDX |
28 |
| -* VSX |
29 |
| -* VTX |
30 |
| -* VSSX |
31 |
| -* VSTX |
32 |
| -* VSDM |
33 |
| -* VSSM |
34 |
| -* VSTM |
35 |
| -* PDF |
36 |
| -* XPS |
37 |
| -* SWF |
38 |
| -* SVG |
39 |
| -* EMF |
40 |
| -* JPEG |
41 |
| -* PNG |
42 |
| -* BMP |
43 |
| -* TIFF |
44 |
| -* HTML |
45 |
| - |
46 |
| -### Supported Operations |
47 |
| -* Convert document format |
48 |
| -* Create new document |
49 |
| -* Upload document and save it with supported format |
50 |
| -* Download document with supported format |
51 |
| - |
52 |
| -For the complete list of use-cases, please refer to [common operations format support map](https://docs.aspose.cloud/display/diagramcloud/Supported+File+Formats#SupportedFileFormats-CommonOperationsFormatSupportMap) to see what you can achieve! |
53 |
| - |
54 |
| - |
55 |
| -# Storage API support |
56 |
| -#### Since version 19.10, SDK includes support of storage operations for better user experience and unification, so now there's no need to use 2 different SDKs! |
57 |
| - |
58 |
| -It gives you an ability to: |
59 |
| -* Upload, download, copy, move and delete files, including versions handling (if you are using Cloud storage that supports this feature - true by default) |
60 |
| -* Create, copy, move and delete folders |
61 |
| -* Copy and move files and folders accross separate storages in scope of a single operation |
62 |
| -* Check if certain file, folder or storage exists |
63 |
| - |
64 |
| -## Usage |
65 |
| -Please, add the following [pypi](https://pypi.org/project/asposediagramcloud/) to your project. |
66 |
| -### pip install |
67 |
| - |
68 |
| -```sh |
69 |
| -pip install asposediagramcloud |
70 |
| -``` |
71 |
| -(you may need to run `pip` with root permission: `sudo pip install asposediagramcloud`) |
| 1 | +Python Cloud SDK wraps Aspose.Diagram REST API so you could seamlessly integrate Microsoft Visio® diagram generation, manipulation & conversion features into your own Python applications. |
72 | 2 |
|
73 |
| -Then import the package: |
74 |
| -```python |
75 |
| -import asposediagramcloud |
76 |
| -``` |
| 3 | +[Aspose.Diagram Cloud SDK for Python](https://products.aspose.cloud/diagram/python) offers to create new Visio files as well as export Visio files (VSD, VSDX, VSS, VSSX, VTX, VDX, VDW, VST, VSTX, and VSX) to image formats (PNG, SVG, EMF, TIFF, BMP & JPEG), export Visio flowcharts to HTML, SWF & XAML, and export diagrams to fixed-layouts, such as PDF & XPS. Feel free to explore the [Developer's Guide](https://docs.aspose.cloud/display/diagramcloud/Developer+Guide) for all usage scenarios. |
77 | 4 |
|
78 |
| -# Examples |
79 |
| -Please, look at [Examples](EXAMPLES.md) document for basic usage or use the [Examples](Examples) folder for more sophisticated scenarios. |
| 5 | +## Visio Processing Features |
80 | 6 |
|
81 |
| -### Aspose Cloud-hosted service VS on-premise deployment (*experimental feature*) |
82 |
| -Starting from v19.10, you can choose either to use Aspose Cloud-hosted image processing service (the standard way) or the Docker image from Docker Hub deployed on-premise to serve the requests. |
83 |
| -The details about key differences and deployment process will be described on the dedicated Docker Hub page as soon as it's released. |
| 7 | +- Retrieve document information of a Visio diagram. |
| 8 | +- Programmatically create a new Microsoft Visio diagram file. |
| 9 | +- Convert Visio flow-charts to other supported formats. |
| 10 | +- Upload your business oriented Visio diagrams to cloud storage. |
| 11 | +- Export Visio files to raster images, fixed-layout and HTML formats. |
84 | 12 |
|
85 |
| -To succeed with your on-premise service usage by the SDK, you need to: |
86 |
| -1. Use the new API class constructor with grantType parameter, clientId and clientSecret parameters. |
87 |
| -``` |
88 |
| -diagramApi=DiagramApi(grantType,clientId,clientSecret) |
| 13 | +## New Features in Version 20.3 |
| 14 | + |
| 15 | +Added support to draw following objects on a page: |
| 16 | +- Polyline |
| 17 | +- Line |
| 18 | +- Ellipse |
| 19 | + |
| 20 | +Added support to: |
| 21 | +- Set page setting |
| 22 | +- Add new empty page |
| 23 | +- Get pages info |
| 24 | + |
| 25 | +For the detailed notes, please visit [Aspose.Diagram Cloud 20.3 Release Notes](https://docs.aspose.cloud/display/diagramcloud/Aspose.Diagram+Cloud+20.3+Release+Notes). |
| 26 | + |
| 27 | +## Read & Write Visio Formats |
| 28 | + |
| 29 | +**Microsoft Visio:** VSDX, VSX, VTX, VDX, VSSX, VSTX, VSDM, VSSM, VSTM |
| 30 | + |
| 31 | +## Save Visio As |
| 32 | + |
| 33 | +**Fixed Layout:** PDF, XPS |
| 34 | +**Images:** JPEG, PNG, BMP, TIFF, SVG, EMF |
| 35 | +**Web:** HTML |
| 36 | +**Other:** XAML, SWF |
| 37 | + |
| 38 | +## Read Visio Formats |
| 39 | + |
| 40 | +**Microsoft Visio:** VDW, VSD, VSS, VST |
| 41 | + |
| 42 | +## Getting Started with Aspose.Diagram Cloud SDK for Python |
| 43 | + |
| 44 | +Firstly, create an account at [Aspose for Cloud](https://dashboard.aspose.cloud/#/apps) to get your application information and free quota to use the API. Now execute `pip install asposediagramcloud` from the command line to get the get the SDK from PIP. The complete source code is available at [GitHub Repository](https://github.com/aspose-diagram-cloud/aspose-diagram-cloud-python). |
| 45 | + |
| 46 | +## Use Python Code to Convert Visio VDX to PDF |
| 47 | + |
| 48 | +```python |
| 49 | +import os |
| 50 | +import asposediagramcloud |
| 51 | +from asposediagramcloud.apis.diagram_file_api import DiagramFileApi |
| 52 | +from asposediagramcloud.models import FileFormatRequest |
| 53 | +import examples_base |
| 54 | + |
| 55 | +api_client = examples_base.GetApiClient() |
| 56 | +diagramAPI = asposediagramcloud.apis.diagram_file_api.DiagramFileApi(api_client) |
| 57 | + |
| 58 | +ABSPATH = os.path.abspath(os.path.realpath(os.path.dirname(__file__)) + "/..") |
| 59 | +dataFolder = os.path.join(ABSPATH, "testData") |
| 60 | + |
| 61 | +filename ='file_get_1.vdx' |
| 62 | + |
| 63 | +# Upload file to Cloud Storage |
| 64 | +filePath = os.path.join(dataFolder, filename) |
| 65 | +examples_base.Upload(filePath, filename, folder=None, storage=None) |
| 66 | + |
| 67 | +# Convert file to PDF format |
| 68 | +folder = "" |
| 69 | +is_overwrite = "true" |
| 70 | +format =FileFormatRequest(format="pdf") |
| 71 | +newfilename = "file_saveas_python.pdf" |
| 72 | +result = diagramAPI.diagram_file_post_save_as(filename, folder=folder, newfilename=newfilename, format=format, is_overwrite=is_overwrite) |
| 73 | +print(result); |
89 | 74 | ```
|
90 |
| -2. Set *storage* or *storageName* parameters for each request where they're present (mandatory!). |
91 |
| - |
92 |
| -# Tests |
93 |
| -Tests are intended for internal usage only. |
94 |
| - |
95 |
| -# Licensing |
96 |
| -All Aspose.Diagram Cloud SDKs, helper scripts and templates are licensed under [MIT License](LICENSE). |
97 |
| - |
98 |
| -# Contact Us |
99 |
| -Your feedback is very important to us. Please feel free to contact via |
100 |
| -+ [**Free Support Forum**](https://forum.aspose.cloud/c/diagram) |
101 |
| -+ [**Paid Support Helpdesk**](https://helpdesk.aspose.cloud/) |
102 |
| - |
103 |
| -# Resources |
104 |
| -+ [**Website**](https://www.aspose.cloud) |
105 |
| -+ [**Product Home**](https://products.aspose.cloud/diagram) |
106 |
| -+ [**Documentation**](https://docs.aspose.cloud/display/diagramcloud/Home) |
107 |
| -+ [**API Reference**](https://apireference.aspose.cloud/diagram/) |
108 |
| -+ [**Free Support Forum**](https://forum.aspose.cloud/c/diagram) |
109 |
| -+ [**Paid Support Helpdesk**](https://helpdesk.aspose.cloud/) |
110 |
| -+ [**Blog**](https://blog.aspose.cloud/category/diagram/ |
| 75 | + |
| 76 | +[Product Page](https://products.aspose.cloud/diagram/python) | [Documentation](https://docs.aspose.cloud/display/diagramcloud/Home) | [Live Demo](https://products.aspose.app/diagram/family) | [API Reference](https://apireference.aspose.cloud/diagram/) | [Code Samples](https://github.com/aspose-diagram-cloud/aspose-diagram-cloud-python) | [Blog](https://blog.aspose.cloud/category/diagram/) | [Free Support](https://forum.aspose.cloud/c/diagram) | [Free Trial](https://dashboard.aspose.cloud/#/apps) |
0 commit comments