Jonas CTO

Convert Apple iWork documents to PDF and Images programatically

Apple iWork suite is a set of applications meant to work with documents, spreadsheets, and presentations. It is built specifically to use on macOS and iOS operating systems, which makes it difficult to automate and maintain. The more flexible, cross-platform option is the MS Office suite, as there are many tools and services supporting formats like .docx, .xlsx, .pptx, etc.

For this purpose we present you our new iWork API, that provides fast and secure conversions to either images, PDFs, or MS Office file formats:

Convert from Convert to
key jpg, pdf, png, ppt, pptx, tiff
numbers csv, pdf, xls, xlsx
pages doc, docx, pdf, rtf, txt

Using our iWork API you are now able to convert iWork suite files programmatically using any OS and any programming language of your choice. Let's see some examples of the most popular programming languages.

iWorks to PDF conversion examples

You can download these example files (source and destination) and check the conversion quality:

image

Convert iWork Pages to MS Office Word using PHP

In this example, we will show a quick code demo for converting the iWork Pages file to a .docx file format using ConvertAPI PHP Client. Find a complete list of pages to .docx conversion properties under the developer mode of our PAGES to DOCX API live demo tool:

ConvertApi::setApiSecret('<YOUR SECRET HERE>');
$result = ConvertApi::convert('docx', [
        'File' => '/path/to/my_file.pages',
    ], 'pages'
);
$result->saveFiles('/path/to/result/dir');

Convert iWork Key to MS Office PowerPoint using C#

In the following example, we will show a quick code demo for converting the iWork Pages file to a .docx file format using ConvertAPI C# Client. Find a complete list of key to .pptx conversion properties under the developer mode of our KEY to PPTX API live demo tool:

var convertApi = new ConvertApi("<YOUR SECRET HERE>");
var convert = await convertApi.ConvertAsync("key", "pptx",
    new ConvertApiFileParam("File", @"C:\path\to\my_file.key")
);
await convert.SaveFilesAsync(@"C:\converted-files\");

Convert iWork Numbers to MS Office Excel using NodeJS

In the last example, we will show a quick code demo for converting the iWork Numbers file to a .xlsx file format using ConvertAPI Node.js Client. Find a complete list of numbers to .xlsx conversion properties under the developer mode of our NUMBERS to XLSX API live demo tool:

var convertapi = require('convertapi')('<YOUR SECRET HERE>');
convertapi.convert('xlsx', {
    File: '/path/to/my_file.numbers'
}, 'numbers').then(function(result) {
    result.saveFiles('/path/to/dir');
});

Conclusion

Each conversion provides a bunch of useful conversion options. You can find the complete list of conversions and their parameters as well as auto-generated code snippets using our interactive Live Demo tool. Simply pick a library for your programming language, copy the auto-generated code snippet, and you are good to go!