Swiftpack.co - Package - aspose-slides-cloud/aspose-slides-cloud-swift

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.

aspose-slides-cloud/aspose-slides-cloud-swift

Swift library for communicating with the Aspose.Slides Cloud API

GitHub license

Swift REST API to Process Presentation in Cloud

This repository contains Aspose.Slides Cloud SDK for Swift source code. This SDK allows you to process & manipulate PPT, PPTX, ODP, OTP using Aspose.slides Cloud REST APIs in your Swift applications.

Presentation Processing Features

  • Fetch presentation images in any of the supported file formats.
  • Copy the layout side or clone the master slide from the source presentation.
  • Process slides shapes, slides notes, placeholders, colors & font theme info.
  • Programmatically create a presentation from HTML & export it to various formats.
  • Merge multiple presentations or split the single presentation into multiple ones.
  • Extract and replace text from a specific slide or an entire presentation.

Read & Write Presentation Formats

Microsoft PowerPoint: PPT, PPTX, PPS, PPSX, PPTM, PPSM, POTX, POTM OpenOffice: ODP, OTP, FODP

Save Presentation As

Fixed Layout: PDF, PDF/A, XPS Images: JPEG, PNG, BMP, TIFF, SVG Web: HTML Other: SWF (export whole presentations)

Enhancements in Version 20.12

  • Updated the SDK to run with cloud image.
  • HttpRequestTimeout property is added to SDK configuration. It allows specifying a custom timeout (in seconds) for HTTP requests made by the SDK.

Enhancements in Version 20.10

  • Removed **ShapeType property from BaseShape class; replaced GeometryShapeType with ShapeType property for GeometryShape.
  • Removed redundant ResourceUriElement class. All properties of ResourceUriElement type are changed to ResourceUri type.

Enhancements in Version 20.9

  • New GetSections, PutSections, PutSection, PostSection, PostSectionMove, DeleteSection, DeleteSections methods to add, update and delete presentation sections.
  • New PostslidesHeaderFooter, PostSlideHeaderFooter, GetSlideHeaderFooter, PostNotesSlideHeaderFooter, GetNotesSlideHeaderFooter methods to manage header/footer settings for slides.
  • Replaced Categories for ParentCategories & Level properties in ChartCategory class to properly support Sunburst & Treeview charts.

Licensing

All Aspose.Slides Cloud SDKs are licensed under MIT License.

How to use the SDK?

The complete source code is available in this repository folder. You can either directly use it in your project via source code or get the library using Cocoapods or Packages (recommended).

Prerequisites

To use Aspose Slides Cloud SDK for Java you need to register an account with Aspose Cloud and lookup/create App Key and SID at Cloud Dashboard. There is free quota available. For more details, see Aspose Cloud Pricing.

Minimal supported Swift version is 4.2.3.

Installation

To use the SDK in a swift package, add a the SDK to dependencies in your Package.swift:

// swift-tools-version:4.2.3
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "MyPackage",
    dependencies: [
        .package(url: "https://github.com/aspose-slides-cloud/aspose-slides-cloud-swift", from: "20.10.0"),
    ],
    targets: [
        .target(
            name: "MyPackage"
            dependencies: ["AsposeSlidesCloud"]),
    ]
)

To use the SDK as a Cocoapod, add "pod 'AsposeSlidesCloud'" line to your Podfile.

target 'myproj' do
  ...
  pod 'AsposeSlidesCloud', '~> 20.10.0'
end

Sample usage

The example code below converts a PowerPoint document to PDF format using AsposeSlidesCloud:

import Foundation
import AsposeSlidesCloud

let dispatchGroup = DispatchGroup()

AsposeSlidesCloudAPI.appSid = "MyClientId"
AsposeSlidesCloudAPI.appKey = "MyClientSecret"

dispatchGroup.enter()
let input = FileManager.default.contents(atPath: "MyPresentation.ppt")!
let request = postSlidesConvertRequest(format: "pdf", document: input)
SlidesAPI.postSlidesConvert(request: request) { (response, e) -> Void in
    do {
        let url = URL(fileURLWithPath: "MyPresentation.pdf")
        try (response as! Data).write(to: url)
    } catch {
        print("Error saving file: \(error).")
    }
    if (e != nil) {
        print("An error occured: \(e).")
    }
    dispatchGroup.leave()
}
dispatchGroup.notify(queue: DispatchQueue.main) {
    exit(EXIT_SUCCESS)
}
dispatchMain()

Aspose.Slides Cloud SDKs in Popular Languages

.NET Java PHP Python Ruby Node.js Android Swift Perl Go
GitHub GitHub GitHub GitHub GitHub GitHub GitHub GitHub GitHub GitHub
NuGet Maven Composer PIP GEM NPM Maven Cocoapods Meta Cpan Go.Dev

Product Page | Documentation | API Reference | Code Samples | Blog | Free Support | Free Trial

Github

link
Stars: 0
Last commit: 1 week ago