Last active
February 25, 2020 13:34
-
-
Save aspose-slides/74de7640c8f072fe50c273602772094b to your computer and use it in GitHub Desktop.
Aspose_Slides_Cloud_Java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
public static final String apiKey="a165298dc077f8852d5eb6e5bf49310d"; | |
public static final String appSID="1c7a12ca-efa8-466e-b83d-234d9d5e2309"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
String name = "sample"; | |
String fileName = name + ".pptx"; | |
String password = ""; | |
String format = "pdf"; | |
String outPath = ""; | |
String fontsLocation="fonts"; | |
Path inputFile = Utils.getPath(ConvertPowerPointDocuments.class, fileName); | |
try | |
{ | |
// Invoke Aspose.Slides Cloud SDK API to convert document to other format using storage | |
ResponseMessage apiResponse = slidesApi.PutSlidesConvert(password, format, outPath, inputFile.toFile(),fontsLocation); | |
if (apiResponse != null) | |
{ | |
System.out.println("Convert PowerPoint Documents to other File Formats without Using Storage, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
String name = "sample"; | |
String fileName = name + ".pptx"; | |
String format = "pdf"; | |
Integer jpegQuality = 50; | |
String password = ""; | |
String storage = ""; | |
String folder = ""; | |
String outPath = ""; | |
Path inputFile = Utils.getPath(ConvertPowerPointSlidesWithAdditionalSettings.class, fileName); | |
try | |
{ | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "",inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to convert document to other format with additional settings | |
ResponseMessage apiResponse = slidesApi.GetSlidesDocumentWithFormat(fileName, format, | |
jpegQuality, password, storage, folder, outPath); | |
if (apiResponse != null) | |
{ | |
System.out.println("Convert PowerPoint Documents to other File Formats with Additional Settings, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
// For complete examples and data files, please go to | |
// https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
String fileName = "sample_empty_" + UUID.randomUUID() + ".pptx"; | |
String password = ""; | |
String storage = ""; | |
String folder = ""; | |
Path p1 = Utils.getPath(CreateEmptyPowerPointSlides.class, "sample.pptx"); | |
try { | |
// Invoke Aspose.Slides Cloud SDK API to create empty presentation | |
DocumentResponse apiResponse = slidesApi.PutNewPresentation(fileName, password, storage, folder, | |
p1.toFile()); | |
if (apiResponse != null) { | |
// Download document from storage server | |
System.out.println("Create Empty PowerPoint Presentation, Done!"); | |
} | |
} catch (Exception ex) { | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
String fileName = "sample.pptx"; | |
String storage = ""; | |
String folder = ""; | |
String mergeFile1 = "sample-input.pptx"; | |
String mergeFile2 = "demo.pptx"; | |
Path p0=Utils.getPath(MergePowerPointDocuments.class, fileName); | |
Path p1=Utils.getPath(MergePowerPointDocuments.class, mergeFile1); | |
Path p2=Utils.getPath(MergePowerPointDocuments.class, mergeFile2); | |
PresentationsMergeRequest body = new PresentationsMergeRequest(); | |
body.setPresentationPaths( new ArrayList<String> ( Arrays.asList(new String[]{mergeFile1,mergeFile2}))); | |
try | |
{ | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "",p0.toFile()); | |
storageApi.PutCreate(mergeFile1, null, null, p1.toFile()); | |
storageApi.PutCreate(mergeFile2, null, null, p2.toFile()); | |
// Invoke Aspose.Slides Cloud SDK to merge PowerPoint presentations | |
DocumentResponse apiResponse = slidesApi.PostPresentationMerge(fileName, storage, folder, body); | |
if (apiResponse != null) | |
{ | |
System.out.println("Merge PowerPoint Presentations, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String fileName = "sample-input.pptx"; | |
int width = 0; | |
int height = 0; | |
int from = 2; | |
int to = 3; | |
String destFolder = ""; | |
String format = "png"; | |
String storage = ""; | |
String folder = ""; | |
Path inputFile = Utils.getPath(ConvertPowerPointDocuments.class, fileName); | |
try | |
{ | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to split powerpoint presentations | |
SplitDocumentResponse apiResponse = slidesApi. | |
PostSlidesSplit(fileName, width, height, to, from, destFolder, format, storage, folder); | |
if (apiResponse != null) | |
{ | |
System.out.println("Split PowerPoint Presentations, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
String fileName = "sample-input.pptx"; | |
String folder = ""; | |
String storage = "dropboxstorage"; | |
Path inputFile = Utils.getPath(GetNumberImagesPresentationThirdPartyStorage.class, fileName); | |
try | |
{ | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "",inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to get number of images in a presentation using third party storage | |
ImagesResponse apiResponse = slidesApi.GetSlidesImages(fileName, folder, storage); | |
if (apiResponse != null) | |
{ | |
int count = apiResponse.getImages().getList().size(); | |
System.out.println("Total Images Found :: " + count); | |
System.out.println("Get Number of Images in a Presentation Using Third Party Storage, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
String fileName = "sample-input.pptx"; | |
int slideIndex = 3; | |
String folder = ""; | |
String storage = "dropboxstorage"; | |
Path inputFile = Utils.getPath(GetNumberImagesSlidesThirdPartyStorage.class, fileName); | |
try | |
{ | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to get number of images in a slide using third party storage | |
ImagesResponse apiResponse = slidesApi.GetSlidesSlideImages(fileName, slideIndex, folder, storage); | |
if (apiResponse != null) | |
{ | |
int count = apiResponse.getImages().getList().size(); | |
System.out.println("Total Images Found :: " + count); | |
System.out.println("Get Number of Images in a Presentation, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String fileName = "sample-input.pptx"; | |
String folder = ""; | |
String storage = ""; | |
Path inputFile = Utils.getPath(ExtractParticularShape.class, fileName); | |
try { | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to get number of images in a | |
// presentation | |
ImagesResponse apiResponse = slidesApi.GetSlidesImages(fileName,folder, storage); | |
if (apiResponse != null) { | |
int count = apiResponse.getImages().getList().size(); | |
System.out.println("Total Images Found :: " + count); | |
System.out.println("Get Number of Images in a Presentation, Done!"); | |
} | |
} catch (Exception ex) { | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String fileName = "sample-input.pptx"; | |
String folder = ""; | |
String storage = ""; | |
Path inputFile = Utils.getPath(ExtractParticularShape.class, fileName); | |
try { | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to get number of images in a | |
// presentation | |
ImagesResponse apiResponse = slidesApi.GetSlidesSlideImages(fileName,1, folder, storage); | |
if (apiResponse != null) { | |
int count = apiResponse.getImages().getList().size(); | |
System.out.println("Total Images Found :: " + count); | |
System.out.println("Get Number of Images in a Presentation, Done!"); | |
} | |
} catch (Exception ex) { | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String fileName = "sample-input.pptx"; | |
String folder = ""; | |
String storage = ""; | |
Path inputFile = Utils.getPath(ExtractParticularShape.class, fileName); | |
try | |
{ | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to remove all document properties | |
DocumentPropertiesResponse apiResponse = slidesApi.DeleteSlidesDocumentProperties(fileName, folder, storage); | |
if (apiResponse != null && apiResponse.getStatus().equals("OK")) | |
{ | |
System.out.println("Remove All Properties, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String fileName = "sample-input.pptx"; | |
String propertyName = "Author"; | |
String folder = ""; | |
String storage = ""; | |
DocumentProperty body = new DocumentProperty(); | |
body.setName("Author"); | |
body.setValue("Naeem Akram"); | |
body.setBuiltIn(true); | |
Path inputFile = Utils.getPath(ExtractParticularShape.class, fileName); | |
try { | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to set document property | |
DocumentPropertyResponse apiResponse = slidesApi.PutSlidesSetDocumentProperty(fileName, propertyName, | |
folder, storage, body); | |
if (apiResponse != null && apiResponse.getStatus().equals("OK")) { | |
DocumentProperty docProperty = apiResponse.getDocumentProperty(); | |
System.out.println(docProperty.getName() + " :: " + docProperty.getValue()); | |
System.out.println("Set Document Properties, Done!"); | |
} | |
} catch (Exception ex) { | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String fileName = "sample-input.pptx"; | |
String folder = ""; | |
String storage = ""; | |
Path inputFile = Utils.getPath(WorkingWithDocumentProperties.class, fileName); | |
try | |
{ | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to get document properties | |
DocumentPropertiesResponse apiResponse = slidesApi.GetSlidesDocumentProperties(fileName, folder, storage); | |
if (apiResponse != null && apiResponse.getStatus().equals("OK")) | |
{ | |
for (DocumentProperty docProperty : apiResponse.getDocumentProperties().getList()) | |
{ | |
System.out.println(docProperty.getName() + " :: " + docProperty.getValue()); | |
} | |
System.out.println("Get Document Properties, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String fileName = "sample-input.pptx"; | |
int slideIndex = 2; | |
String shapePath = "2"; | |
String folder = ""; | |
String storage = ""; | |
Path inputFile = Utils.getPath(ExtractParticularShape.class, fileName); | |
try | |
{ | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "",inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to get particular shape from slide | |
ShapeResponse apiResponse = slidesApi.GetSlidesSlideShapesParent(fileName, slideIndex, shapePath, folder, storage); | |
if (apiResponse != null) | |
{ | |
System.out.println("Get a Particular Shape from the Slide, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace();; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String fileName = "sample-input.pptx"; | |
int slideIndex = 1; | |
String folder = ""; | |
String storage = ""; | |
Path inputFile = Utils.getPath(ExtractShapeFromSlide.class, fileName); | |
try | |
{ | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to extract shapes | |
ShapeListResponse apiResponse = slidesApi.GetSlidesSlideShapes(fileName, slideIndex, folder, storage); | |
if (apiResponse != null) | |
{ | |
System.out.println("Extract Shapes from a Slide, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
String fileName = "sample-input.pptx"; | |
int slideIndex = 1; | |
String folder = ""; | |
String storage = "dropboxstorage"; | |
Path inputFile = Utils.getPath(ExtractShapeUsingThirdPartyStorage.class, fileName); | |
try | |
{ | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to extract shape from a slide using third party storage | |
ShapeListResponse apiResponse = slidesApi.GetSlidesSlideShapes(fileName, slideIndex, folder, storage); | |
if (apiResponse != null) | |
{ | |
System.out.println("Extract Shapes from a Slide Using Third Party Storage, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String fileName = "sample-input.pptx"; | |
String folder = ""; | |
String storage = ""; | |
Path inputFile = Utils.getPath(AddNewSlidetoPresentation.class, fileName); | |
try | |
{ | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to add new slide | |
SlideListResponse apiResponse = slidesApi.PostAddEmptySlide(fileName, folder, storage); | |
if (apiResponse != null && apiResponse.getStatus().equals("OK")) | |
{ | |
System.out.println("Add a New Slide in a PowerPoint Presentation, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String fileName = "sample-input.pptx"; | |
int oldPosition = 3; | |
int newPosition = 2; | |
String folder = ""; | |
String storage = ""; | |
Path inputFile = Utils.getPath(ChangePostionOfSlides.class, fileName); | |
try | |
{ | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to change position of slide in presentation | |
SlideListResponse apiResponse = slidesApi.PostSlidesReorderPosition(fileName, oldPosition, newPosition, folder, storage); | |
if (apiResponse != null && apiResponse.getStatus().equals("OK")) | |
{ | |
System.out.println("Change Position of Slides in a PowerPoint Presentation, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String fileName = "sample-input.pptx"; | |
int position = 1; | |
int slideToClone = 3; | |
String folder = ""; | |
String storage = ""; | |
Path inputFile = Utils.getPath(CopySlidesinPowerpointPresentation.class, fileName); | |
try | |
{ | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to copy slides in a PowerPoint presentation | |
SlideListResponse apiResponse = slidesApi.PostClonePresentationSlide(fileName, position, slideToClone, folder, storage); | |
if (apiResponse != null && apiResponse.getStatus().equals("OK")) | |
{ | |
System.out.println("Copy Slides in a PowerPoint Presentation, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String fileName = "sample-input.pptx"; | |
String folder = ""; | |
String storage = "dropboxstorage"; | |
Path inputFile = Utils.getPath(DeleteAllSlidesfromaPresentationUsingThirdPartyStorage.class, fileName); | |
try | |
{ | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to detect all slides using third party storage | |
SlideListResponse apiResponse = slidesApi.DeleteSlidesCleanSlidesList(fileName, folder, storage); | |
if (apiResponse != null && apiResponse.getStatus().equals("OK")) | |
{ | |
System.out.println("Delete All Slides from a Presentation Using Third Party Storage, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String fileName = "demo.pptx"; | |
int slideIndex = 1; | |
String folder = ""; | |
String storage = ""; | |
Path inputFile = Utils.getPath(DeleteBackgroundFromSlide.class, fileName); | |
try | |
{ | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to detect slide background | |
SlideBackgroundResponse apiResponse = slidesApi.DeleteSlidesSlideBackground(fileName, slideIndex, folder, storage); | |
if (apiResponse != null && apiResponse.getStatus().equals("OK")) | |
{ | |
System.out.println("Delete Background of a PowerPoint Slide, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String fileName = "sample-input.pptx"; | |
int slideIndex = 3; | |
String folder = ""; | |
String storage = ""; | |
Path inputFile = Utils.getPath(DeleteSlideFromPowerpointPresentation.class, fileName); | |
try | |
{ | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to delete slide | |
SlideListResponse apiResponse = slidesApi.DeleteSlideByIndex(fileName, slideIndex, folder, storage); | |
if (apiResponse != null && apiResponse.getStatus().equals("OK")) | |
{ | |
System.out.println("Delete a Slides from a PowerPoint Presentation, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String fileName = "sample-input.pptx"; | |
String folder = ""; | |
String storage = ""; | |
Path inputFile = Utils.getPath(SavePowerPointDefautImage.class, fileName); | |
try | |
{ | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to detect all slides from a presentation | |
SlideListResponse apiResponse = slidesApi.DeleteSlidesCleanSlidesList(fileName, folder, storage); | |
if (apiResponse != null && apiResponse.getStatus().equals("OK")) | |
{ | |
System.out.println("Delete All Slides from a PowerPoint Presentation, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String fileName = "demo.pptx"; | |
int slideIndex = 1; | |
String folder = ""; | |
String storage = ""; | |
Path inputFile = Utils.getPath(GetAspectRatioFromSlide.class, fileName); | |
try | |
{ | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to get aspect ratio of a power point slide | |
SlideResponse apiResponse = slidesApi.GetSlidesSlide(fileName, slideIndex, folder, storage); | |
if (apiResponse != null) | |
{ | |
System.out.println("Height is " + apiResponse.getSlide().getHeight() | |
+ " and width is " +apiResponse.getSlide().getWidth()); | |
System.out.println("Get Aspect Ratio of a PowerPoint Slide, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String fileName = "demo.pptx"; | |
int slideIndex = 1; | |
String folder = ""; | |
String storage = ""; | |
Path inputFile = Utils.getPath(SavePowerPointDefautImage.class, fileName); | |
try { | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to get slide background | |
SlideBackgroundResponse apiResponse = slidesApi.GetSlidesSlideBackground(fileName, slideIndex, folder, | |
storage); | |
if (apiResponse != null && apiResponse.getStatus().equals("OK")) { | |
SlideBackground slideBackground = apiResponse.getBackground(); | |
System.out.println("SlideBackground Type :: " + slideBackground.getType()); | |
System.out.println("Get Background of a PowerPoint Slide, Done!"); | |
} | |
} catch (Exception ex) { | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String fileName = "demo.pptx"; | |
int slideIndex = 1; | |
String folder = ""; | |
String storage = ""; | |
Path inputFile = Utils.getPath(GetColorSchemeFromPowerPointSlide.class, fileName); | |
try | |
{ | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "",inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to get slide color scheme | |
ColorSchemeResponse apiResponse = slidesApi.GetSlidesThemeColorScheme(fileName, slideIndex, folder, storage); | |
if (apiResponse != null && apiResponse.getStatus().equals("OK")) | |
{ | |
ColorScheme colorScheme = apiResponse.getColorScheme(); | |
System.out.println("Accent1 : " + colorScheme.getAccent1()); | |
System.out.println("Accent3 : " + colorScheme.getAccent2()); | |
System.out.println("Dark1 : " + colorScheme.getDark1()); | |
System.out.println("Dark2 : " + colorScheme.getDark2()); | |
System.out.println("Light1 : " + colorScheme.getLight1()); | |
System.out.println("Get Color Scheme of a PowerPoint Slide, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String fileName = "sample-input.pptx"; | |
int slideIndex = 1; | |
String folder = ""; | |
String storage = ""; | |
Path inputFile = Utils.getPath(GetCommentsFromSlide.class, fileName); | |
try | |
{ | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to get comments of a slide | |
SlideCommentsResponse apiResponse = slidesApi.GetSlidesSlideComments(fileName, slideIndex, folder, storage); | |
if (apiResponse != null && apiResponse.getStatus().equals("OK")) | |
{ | |
SlideComments slideComments = apiResponse.getSlideComments(); | |
for (SlideComment slideComment : slideComments.getList()) | |
{ | |
System.out.println("Author :: " + slideComment.getAuthor()); | |
System.out.println("Text :: " + slideComment.getText()); | |
} | |
System.out.println("Get Comments of a PowerPoint Slide, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String fileName = "demo.pptx"; | |
int slideIndex = 1; | |
String folder = ""; | |
String storage = ""; | |
Path inputFile = Utils.getPath(GetFontSchemePowerpointSlide.class, fileName); | |
try | |
{ | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to get slide font scheme | |
FontSchemeResponse apiResponse = slidesApi.GetSlidesThemeFontScheme(fileName, slideIndex, folder, storage); | |
if (apiResponse != null && apiResponse.getStatus().equals("OK")) | |
{ | |
FontScheme fontScheme = apiResponse.getFontScheme(); | |
System.out.println("Name: " + fontScheme.getName()); | |
System.out.println("ComplexScript (heading part) : " + fontScheme.getMajor().getComplexScript()); | |
System.out.println("EastAsian (heading part) : " + fontScheme.getMajor().getEastAsian()); | |
System.out.println("Latin (heading part) : " + fontScheme.getMajor().getLatin()); | |
System.out.println("ComplexScript (body part) : " + fontScheme.getMinor().getComplexScript()); | |
System.out.println("EastAsian (body part) : " + fontScheme.getMinor().getEastAsian()); | |
System.out.println("Latin (body part) : " + fontScheme.getMinor().getLatin()); | |
System.out.println("Get Font Scheme of a PowerPoint Slide, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String fileName = "sample-input.pptx"; | |
int slideIndex = 1; | |
String folder = ""; | |
String storage = ""; | |
Path inputFile = Utils.getPath(SavePowerPointDefautImage.class, fileName); | |
try | |
{ | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "",inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to get placeholder count from a slide | |
PlaceholdersResponse apiResponse = slidesApi.GetSlidesPlaceholders(fileName, slideIndex, folder, storage); | |
if (apiResponse != null && apiResponse.getStatus().equals("OK")) | |
{ | |
int placeholderCount = apiResponse.getPlaceholders().getPlaceholderLinks().size(); | |
System.out.println("PlaceholderCount :: " + placeholderCount); | |
System.out.println("Get Placeholder Count from a PowerPoint Slide, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String fileName = "sample-input.pptx"; | |
int slideIndex = 1; | |
int placeholderIndex = 0; | |
String folder = ""; | |
String storage = ""; | |
Path inputFile = Utils.getPath(GetPlaceholderFromSlide.class, fileName); | |
try | |
{ | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "",inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to get placeholder from a slide | |
PlaceholderResponse apiResponse = slidesApi.GetSlidesPlaceholder(fileName, slideIndex, placeholderIndex, folder, storage); | |
if (apiResponse != null && apiResponse.getStatus().equals("OK")) | |
{ | |
Placeholder placeholder = apiResponse.getPlaceholder(); | |
System.out.println("Get Placeholder from a PowerPoint Slide, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String fileName = "sample-input.pptx"; | |
String folder = ""; | |
String storage = ""; | |
Path inputFile = Utils.getPath(GetSlideCountFromPresentation.class, fileName); | |
try | |
{ | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to get slide count | |
SlideListResponse apiResponse = slidesApi.GetSlidesSlidesList(fileName, folder, storage); | |
if (apiResponse != null && apiResponse.getStatus().equals("OK")) | |
{ | |
int count = apiResponse.getSlides().getSlideList().size(); | |
System.out.println("Total Slides :: " + count); | |
System.out.println("Get PowerPoint Slide Count, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String fileName = "sample-input.pptx"; | |
String folder = ""; | |
String storage = "dropboxstorage "; | |
Path inputFile = Utils.getPath(GetSlideCountUsingThirdPartyStorage.class, fileName); | |
try | |
{ | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to get slide count using third party storage | |
SlideListResponse apiResponse = slidesApi.GetSlidesSlidesList(fileName, folder, storage); | |
if (apiResponse != null && apiResponse.getStatus().equals("OK")) | |
{ | |
int count = apiResponse.getSlides().getSlideList().size(); | |
System.out.println("Total Slides :: " + count); | |
System.out.println("Get Slide Count Using Third Party Storage, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String name = "sample-input"; | |
String fileName = name + ".pptx"; | |
int slideIndex = 3; | |
String format = "jpeg"; | |
int width = 0; | |
int height = 0; | |
String folder = ""; | |
String storage = "dropboxstorage"; | |
Path inputFile = Utils.getPath(SaveaParticularSlideasImagewithDefaultSizeUsingThirdPartyStorage.class, fileName); | |
try | |
{ | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to save slide as image with default size using third party storage | |
ResponseMessage apiResponse = slidesApi.GetSlideWithFormat(fileName, slideIndex, format, width, height, folder, storage); | |
if (apiResponse != null) | |
{ | |
System.out.println("Save a Particular Slide as Image with Default Size Using Third Party Storage, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String name = "sample-input"; | |
String fileName = name + ".pptx"; | |
int slideIndex = 3; | |
String format = "jpeg"; | |
int width = 200; | |
int height = 300; | |
String folder = ""; | |
String storage = "dropboxstorage"; | |
Path inputFile = Utils.getPath(SaveaParticularSlideasImagewithSpecifiedSizeUsingThirdPartyStorage.class, fileName); | |
try | |
{ | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to save slide as image with specified size using third party storage | |
ResponseMessage apiResponse = slidesApi.GetSlideWithFormat(fileName, slideIndex, format, width, height, folder, storage); | |
if (apiResponse != null) | |
{ | |
System.out.println("Save a Particular Slide as Image with Specified Size Using Third Party Storage, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String name = "sample-input"; | |
String fileName = name + ".pptx"; | |
int slideIndex = 3; | |
String format = "jpeg"; | |
int width = 0; | |
int height = 0; | |
String folder = ""; | |
String storage = ""; | |
Path inputFile = Utils.getPath(SavePowerPointDefautImage.class, fileName); | |
Path target=Paths.get(name + "." + format); | |
try { | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to save slide as image with | |
// default size | |
ResponseMessage apiResponse = slidesApi.GetSlideWithFormat(fileName, slideIndex, format, width, height, | |
folder, storage); | |
if (apiResponse != null) { | |
Files.copy(apiResponse.getInputStream(),target); | |
System.out.println("Save a PowerPoint Slide as Image with Default Size, Done!"); | |
} | |
} catch (Exception ex) { | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String name = "sample-input"; | |
String fileName = name + ".pptx"; | |
int slideIndex = 3; | |
String format = "jpeg"; | |
int width = 200; | |
int height = 300; | |
String folder = ""; | |
String storage = ""; | |
Path target=Paths.get(name + "." + format); | |
Path inputFile = Utils.getPath(SavePowerPointSlideSpecifiedImage.class, fileName); | |
try | |
{ | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to save slide as image with specified size | |
ResponseMessage apiResponse = slidesApi.GetSlideWithFormat(fileName, slideIndex, format, width, height, folder, storage); | |
if (apiResponse != null) | |
{ | |
Files.copy(apiResponse.getInputStream(),target); | |
System.out.println("Save a PowerPoint Slide as Image with Specified Size, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String fileName = "sample-input.pptx"; | |
boolean withEmpty = false; | |
String folder = ""; | |
String storage = ""; | |
Path inputFile = Utils.getPath(GetAllTextFromDocument.class, fileName); | |
try { | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to get all text items from a | |
// presentation | |
TextItemsResponse apiResponse = slidesApi.GetSlidesPresentationTextItems(fileName, withEmpty, folder, | |
storage); | |
if (apiResponse != null && apiResponse.getStatus().equals("OK")) { | |
System.out.println("Get All Text Items from a Presentation, Done!"); | |
} | |
} catch (Exception ex) { | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String fileName = "sample-input.pptx"; | |
int slideIndex = 1; | |
Boolean withEmpty = false; | |
String folder = ""; | |
String storage = ""; | |
Path inputFile = Utils.getPath(GetAllTextFromSlide.class, fileName); | |
try | |
{ | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "",inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to append word document | |
TextItemsResponse apiResponse = slidesApi.GetSlidesSlideTextItems(fileName, slideIndex, withEmpty, folder, storage); | |
if (apiResponse != null) | |
{ | |
System.out.println("Get All Text Items from a Slide, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
String fileName = "sample-input.pptx"; | |
boolean withEmpty = false; | |
String folder = ""; | |
String storage = "dropboxstorage"; | |
Path inputFile = Utils.getPath(GetAllTextFromSlide.class, fileName); | |
try | |
{ | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "", inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to get all text items from presentation using third party storage | |
TextItemsResponse apiResponse = slidesApi.GetSlidesPresentationTextItems(fileName, withEmpty, folder, storage); | |
if (apiResponse != null && apiResponse.getStatus().equals("OK")) | |
{ | |
for (TextItem textItem : apiResponse.getTextItems().getItems()) | |
{ | |
System.out.println("Text :: " + textItem.getText()); | |
} | |
System.out.println("Get All Text Items from a Presentation Using Third Party Storage, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
String fileName = "sample-input.pptx"; | |
int slideIndex = 1; | |
Boolean withEmpty = false; | |
String folder = ""; | |
String storage = "dropboxstorage"; | |
Path inputFile = Utils.getPath(GetAllTextItemsFromSlideUsingThirdPartyStorage.class, fileName); | |
try | |
{ | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "",inputFile.toFile()); | |
// Invoke Aspose.PDF Cloud SDK API to get all text items from a slide using third party storage | |
TextItemsResponse apiResponse = slidesApi.GetSlidesSlideTextItems(fileName, slideIndex, withEmpty, folder, storage); | |
if (apiResponse != null && apiResponse.getStatus().equals("OK")) | |
{ | |
for (TextItem textItem : apiResponse.getTextItems().getItems()) | |
{ | |
System.out.println("Text :: " + textItem.getText()); | |
} | |
System.out.println("Get All Text Items from a Presentation Using Third Party Storage, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String fileName = "sample-input.pptx"; | |
String oldValue = "aspose"; | |
String newValue = "aspose2"; | |
boolean ignoreCase = true; | |
String folder = ""; | |
String storage = ""; | |
Path inputFile = Utils.getPath(ReplaceAllInstancesInPresentation.class, fileName); | |
try | |
{ | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "",inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to get all text instances from presentation | |
PresentationStringReplaceResponse apiResponse = slidesApi.PostSlidesPresentationReplaceText(fileName, oldValue, newValue, ignoreCase, folder, storage); | |
if (apiResponse != null && apiResponse.getStatus().equals("OK")) | |
{ | |
System.out.println("Replace All Text Instances in a Presentation, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-Cloud | |
String fileName = "sample-input.pptx"; | |
int slideIndex = 1; | |
String oldValue = "aspose"; | |
String newValue = "apose2"; | |
boolean ignoreCase = true; | |
String folder = ""; | |
String storage = ""; | |
Path inputFile = Utils.getPath(ReplaceAllInstancesInPresentation.class, fileName); | |
try | |
{ | |
SlidesApi slidesApi = new SlidesApi(Configuration.apiKey, Configuration.appSID); | |
StorageApi storageApi = new StorageApi(Configuration.apiKey, Configuration.appSID, true); | |
// Upload source file to aspose cloud storage | |
storageApi.PutCreate(fileName, "", "",inputFile.toFile()); | |
// Invoke Aspose.Slides Cloud SDK API to replace all text instances in a slide | |
SlideStringReplaceResponse apiResponse = slidesApi.PostSlidesSlideReplaceText(fileName, slideIndex, oldValue, newValue, ignoreCase, folder, storage); | |
if (apiResponse != null && apiResponse.getStatus().equals("OK")) | |
{ | |
// Download updated presentation from cloud storage | |
System.out.println("Replace All Text Instances in a Slide, Done!"); | |
} | |
} | |
catch (Exception ex) | |
{ | |
ex.printStackTrace(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment