Local File Conversion – Aspose.HTML Cloud
Contents
[
Hide
Show
]This article explains how to convert local files using Aspose.HTML Cloud API in both synchronous and asynchronous modes. While this example demonstrates converting HTML to PDF, the API supports many other formats. You can convert between the following formats by simply changing the URL path:
- HTML Converter: Convert HTML to PDF, XPS, DOCX, JPEG, PNG, TIFF, BMP, GIF, Markdown, and MHTML.
- EPUB Converter: Convert EPUB to PDF, XPS, DOCX, JPEG, PNG, TIFF, BMP, and GIF.
- MHTML Converter: Convert MHTML to PDF, XPS, DOCX, JPEG, PNG, TIFF, BMP, and GIF.
- Markdown Converter: Convert Markdown to PDF, XPS, DOCX, JPEG, PNG, TIFF, BMP, and GIF.
- XHTML Converter: Convert XHTML to PDF, XPS, DOCX, JPEG, PNG, TIFF, BMP, and GIF.
- SVG Converter: Convert SVG to PDF, XPS, JPEG, PNG, TIFF, BMP, and GIF.
- Image Vectorization: Convert raster images to vector formats like SVG.
Before starting, make sure you have obtained an authorization token. See Authorization Guide for more information.
Local File Conversion Process
Aspose.HTML Cloud offers two methods for local file conversion:
- Synchronous Conversion: Suitable for small files, where the conversion request returns the converted file directly in the response.
- Asynchronous Conversion: Ideal for large files, where the conversion runs in the background, and you can download the file once the process is completed.
Step 1: Upload Local File to Cloud Storage
Before conversion, you need to upload your local file to Aspose Cloud storage.
Step 2: Convert Uploaded File (Sync and Async)
For synchronous and asynchronous conversion, follow the same approach as described in the
File Conversion Guide, using the uploaded file path as InputPath
.