سويفت API لتحويل المواد المستنفدة للأوزون إلى SVG

مكتبة سويفت لتحويل المواد المستنفدة للأوزون إلى SVG

استخدم Cells تحويل REST API لإنشاء سير عمل جدول بيانات مخصص في Swift. يعد هذا حلاً احترافيًا لتحويل ODS إلى SVG وتنسيقات المستندات الأخرى عبر الإنترنت باستخدام Swift.

تحويل ملف ODS إلى SVG في Swift

API
PUT
https://api.aspose.cloud/v3.0/cells/convert

يعد تحويل تنسيقات الملفات من ODS إلى SVG مهمة معقدة. يتم تنفيذ جميع التحولات من تنسيق ODS إلى SVG بواسطة Swift SDK الخاص بنا مع الحفاظ على المحتوى الهيكلي والمنطقي الرئيسي لجدول بيانات ODS. تعد مكتبة Swift الخاصة بنا حلاً احترافيًا لتحويل ملفات ODS إلى ملفات SVG عبر الإنترنت. يوفر Cloud SDK لمطوري Swift وظائف قوية وإخراج SVG مثاليًا.

مثال التعليمات البرمجية في Swift باستخدام REST API لتحويل ODS إلى تنسيق SVG

// For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-swift/
    import AsposeCellsCloud
    let expectation1 = self.expectation(description: "checkAuth")
    AsposeCellsCloudAPI.clientId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    AsposeCellsCloudAPI.clientSecret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    AuthAspose.checkAuth()
    {
        (authError) in
        guard authError == nil else {
            XCTFail("error checkAuth")
            return
        }
        expectation1.fulfill()
    }
    self.waitForExpectations(timeout: testTimeout, handler: nil)        
    let expectation = self.expectation(description: "PutConvert")
    let workbook:String = "Book1.ods"
    let format:String? = "svg"     
    let url1: URL? = getURL(workbook)
    let filedata = NSData(contentsOfFile: url1!.path)
    let password:String? = nil
    let outPath:String? = nil
    CellsAPI.cellsWorkbookPutConvertWorkbook(file: url1!, format: format, password: password, outPath: outPath)
    {
        (response, error) in
        guard error == nil else {
            let errorinfo = self.GetErrorDataInfo(error: error as! ErrorResponse)
            print("error info: \(errorinfo!)")
            XCTFail("error PutConvert")
            return
        }            
        if let response = response {
            //response is a Data of file, we may write it down and check it.
            let fileName = "dest.svg"
            let filePath = NSHomeDirectory()
            let fileManager = FileManager.default
            let path = "\(filePath)/tmp/\(fileName)"
            fileManager.createFile(atPath: path, contents:nil, attributes:nil)
            let handle = FileHandle(forWritingAtPath:path)
            handle?.write(response as Data)
            expectation.fulfill()
        }
    }
    self.waitForExpectations(timeout: testTimeout, handler: nil)


كيفية استخدام Swift API لتحويل المواد المستنفدة للأوزون إلى SVG

  1. قم بإنشاء حساب علىلوحة القيادة للحصول على تفاصيل الحصص والترخيص API مجانًا
  2. تهيئة CellsApi باستخدام معرف العميل وسر العميل وعنوان URL الأساسي وإصدار API
  3. قم باستدعاء أسلوب cellWorkbookPutConvertWorkbook للحصول على الدفق الناتج


متطلبات النظام

  1. ماك مونتيري 12.4
  2. سويفت 4.2