XPS to TIFF
Unlock the power of your JavaScript applications! Our cutting-edge API solution makes it incredibly simple to convert XPS (XML Paper Specification) files directly into high-quality TIFF images.
Aspose.Page for XPS to TIFF converter offers conversion to a TIFF image using JavaScript.
Whether you're working on web graphics, dynamic image rendering, or automated asset generation, our API provides the precision and speed you need. Forget complex external tools or manual conversions—now you can integrate seamless XPS to TIFF transformation right into your JavaScript workflow.
In order to convert XPS to TIFF:
- Aspose.Page for JavaScript API, which is a feature-rich, powerful, and easy-to-use document manipulation and conversion API for JavaScript solution.
- You can download its latest version directly from our site , and follow instruction to install.
Steps to Convert XPS to TIFF using JavaScript
Aspose.Page makes it easy for the developers to load and convert EPS files to BMP in just a few lines of code.
- Create file reader ‘const file_reader = new FileReader();’ and read file ‘file_reader.readAsArrayBuffer(e.target.files[0]);’
- On load event handler call AsposeXPSSaveAsImage and pass the file content and its name, image format Module.ImageFormat.Tiff and SuppressError boolean values to it.
- The result JSON contains the count of files in countFiles and the array of file names in filesNameResult. One file for one page of the input document.
- You can download files by using the DownloadFile function: ‘for (let fileIndex = 0; fileIndex < json.filesCount; fileIndex++) DownloadFile(json.filesNameResult[fileIndex], ‘image/png’);’
Save XPS as TIFF
var fXPSAsPng = function (e) {
const file_reader = new FileReader();
file_reader.onload = (event) => {
const json = AsposeXPSSaveAsImage(event.target.result, e.target.files[0].name, Module.ImageFormat.Tiff, true);
if (json.errorCode == 0) {
document.getElementById('output').textContent = 'Files(pages) count: ' + json.filesCount.toString();
for (let fileIndex = 0; fileIndex < json.filesCount; fileIndex++) DownloadFile(json.filesNameResult[fileIndex], 'image/png');
}
else
document.getElementById('output').textContent = json.errorText;
}
file_reader.readAsArrayBuffer(e.target.files[0]);
}XPS to TIFF Conversion Web Application
XPS What is XPS File Format
XPS (XML Paper Specification) is Microsoft’s open‑source alternative to PDF. It uses XML/HTML markup to describe page layout, fonts, and images, ensuring consistent rendering across Windows platforms and other operating systems.
TIFF What is TIFF File Format
TIFF (Tagged Image File Format) stores high‑resolution raster images with extensive metadata. It supports multiple pages and various compression schemes, making it popular in professional photography and publishing, though file sizes can be large.