I’ve tried to save the weeklyFlashReport.Save(path, SaveFormat.Pdf);
path - S3 bucket folder name.
When i tried to save - getting below exception - Message:‘Could not find a part of the path ‘/var/task/FlashReport/FlashReport_2/10/20 10:21:43 AM.pdf’.’ when writing an object
Path is looking at local system directory and not S3 object. Please help me out.
Well, this is not an issue with Aspose.Cells APIs as you cannot directly pass S3 objects to Aspose APIs. Even you cannot do that by directly using System.IO APIs (for read/write files) only (without involving Aspose.Cells APIs). However you can load S3 objects into a byte array (Java example) and then pass to Aspose APIs for PDF conversion. Once the conversion is done, you can upload the converted stream back to S3.
Please note, Aspose.Cells allows you to save to on a disk or to stream that you have to use your own code to upload/save to your desired place. Please note, saving output streams to S3 bucket is beyond scope of Aspose.Cells APIs.
I tried the same by getting xlsx data into byte array and passing that byte array to upload it in s3. For excel it is working. The same i tried with PDF, getting “The type Initializer “” throws an exception”
Good to know that your original issue is sorted out now.
For your current issue, you need to install libgdiplus as Aspose.Cells requires this ibrary for rendering features (e.g you may use linux box to run the command lines):