ppt zuwa pptx

Maida PPT zuwa PPTX ta amfani da .NET REST API.

Ana amfani da gabatarwar PowerPoint don raba bayanai, sadar da abun ciki mai tasiri, da jan hankalin masu sauraro. Koyaya, yin aiki tare da nau’ikan fayilolin PowerPoint na wasu lokuta na iya haifar da al’amurran da suka dace, musamman lokacin sauyawa daga tsohuwar tsarin PPT zuwa sabon tsarin PPTX. Anan ne buƙatar canjin PPT zuwa PPTX ta taso. Mayar da fayilolinku [PPT] (https://docs.fileformat.com/presentation/ppt/) zuwa PPTX yana ba da fa’idodi da yawa, gami da ingantaccen daidaitawar fayil. , ingantaccen fasali da ayyuka, kuma mafi kyawun haɗin kai tare da kayan aikin gabatarwa na zamani. Hakanan, don dalilai na dacewa na baya ko takamaiman buƙatu, ƙila mu sami buƙatar canza fayilolin PPTX zuwa tsarin PPT. Don haka a cikin wannan labarin, za mu bincika tsarin da ba su dace ba na canza PPT zuwa PPTX da akasin haka ta amfani da .NET REST API.

API ɗin REST don Canjin PPT zuwa PPTX

Don cim ma canjin PPT zuwa PPTX, za mu iya yin amfani da ikon Aspose.Slides Cloud SDK don NET. Yana ba da cikakken saitin APIs da fasalulluka waɗanda ke ba da damar jujjuya sumul tsakanin nau’ikan gabatarwar PowerPoint daban-daban. API ɗin REST yana ba da keɓancewar mai amfani da ƙaƙƙarfan takardu, yana sa tsarin jujjuya ya zama santsi da inganci. Bugu da ƙari, yana tabbatar da daidaito da amincin fitarwa yayin canza PPT zuwa PPTX ko PPTX zuwa tsarin PPT, ta yadda za ku iya ba da gabatarwar ƙwararru cikin sauƙi.

Mataki na farko shine bincika ‘Aspose.Slides-Cloud’ a cikin manajan fakitin NuGet a cikin IDE Studio Visual sannan danna maɓallin ‘Ƙara Kunshin’. Na biyu, sami takaddun shaidar abokin ciniki daga cloud dashboard ta hanyar shiga ta amfani da asusun Google ko GitHub. Idan ba ku da asusun da ke akwai, kawai ƙirƙiri asusun kyauta ta bin umarnin da aka kayyade a kan farawa da sauri.

Canza PPT zuwa PPTX tare da C# .NET

A cikin wannan sashe, za mu bincika cikakkun bayanai da snippet code don canza PPT zuwa PPTX ta amfani da hanya mai sauƙi da sauƙi.

// Don ƙarin misalai, da fatan za a ziyarci https://github.com/aspose-slides-cloud
// Samu bayanan abokin ciniki daga https://dashboard.aspose.cloud/
string clientSecret = "7f098199230fc5f2175d494d48f2077c";
string clientID = "ee170169-ca49-49a4-87b7-0e2ff815ea6e";

// ƙirƙirar misali na SlidesApi
SlidesApi slidesApi = new SlidesApi(clientID, clientSecret);

// sunan shigar da PowerPoint dake kan ma'ajiyar gajimare
string sourcePPTX = "Architecture pitch deck.ppt";

// Mayar da duk nunin faifai na PPT zuwa tsarin PPTX
var output = slidesApi.DownloadPresentation(inputPowerPoint, ExportFormat.Pptx);

// Ajiye sakamakon PPTX akan faifan gida
using var pdfStream = File.Create("convertedPresentation.pptx");
output.CopyTo(pdfStream);
// rufe rafin fitar da fayil ɗin
pdfStream.Close();

Yanzu bari mu bincika cikakkun bayanai game da snippet code da aka bayyana a sama.

SlidesApi slidesApi = new SlidesApi(clientID, clientSecret);

Da farko, ƙirƙiri wani abu na ajin SlidesApi inda muke wuce bayanan abokin ciniki azaman hujjar shigarwa.

var output = slidesApi.DownloadPresentation(inputPowerPoint, ExportFormat.Pptx);

Kira API don loda PPT da aka adana a cikin ma’ajin gajimare kuma canza duk nunin faifai zuwa tsarin PPTX.

using var pdfStream = File.Create("convertedPresentation.pptx");
images.CopyTo(pdfStream);
pdfStream.Close();

Ajiye sakamakon PPTX akan faifan gida.

API ɗin kuma yana ba da damar sauya zaɓaɓɓun nunin faifai kawai. Don haka don cim ma wannan buƙatu, da fatan za a ƙaddamar da wani abu na Lissafi mai ɗauke da fihirisar nunin faifai a matsayin hujja zuwa hanyar ‘DownloadPresentation(…)’.

List<int> selectdSlides = new List<int> { 1, 3};
//  Get all text items from the presentation.
var output = slidesApi.DownloadPresentation(inputPowerPoint, ExportFormat.Pptx, slides: selectdSlides);
canza ppt zuwa pptx

PPT zuwa samfoti na juyawa PPTX.

Za a iya sauke samfurin Gabatarwar PowerPoint da aka yi amfani da shi a cikin misalin da ke sama daga [Architecture pitch deck.pptx](https://create.microsoft.com/en-us/template/architecture-pitch-deck-b05bf529-a1dc-42d5-b9d6 -8a1e9569dd9).

Canza PPTX zuwa PPT ta amfani da Umarnin CURL

Don canza PPTX zuwa PPT ta amfani da umarnin cURL da Aspose.Slides Cloud, za ku iya yin amfani da APIs masu ƙarfi RESTful da Aspose.Slides Cloud ke bayarwa. Tare da umarnin cURL, zaka iya yin hulɗa tare da Aspose.Slides Cloud API endpoints kuma yi aikin juyawa. Ta hanyar yin buƙatun HTTP tare da ma’auni masu dacewa da tabbatarwa, zaku iya canza fayilolin PPTX ɗinku ba tare da ɓata lokaci ba zuwa tsarin PPT.

Don farawa da wannan hanyar, da farko muna buƙatar samar da alamar samun damar JWT ta aiwatar da umarni mai zuwa:

curl -v "https://api.aspose.cloud/connect/token" \
 -X POST \
 -d "grant_type=client_credentials&client_id=bb959721-5780-4be6-be35-ff5c3a6aa4a2&client_secret=4d84d5f6584160cbd91dba1fe145db14" \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Accept: application/json"

Yanzu, da fatan za a aiwatar da umarni mai zuwa don canza duk nunin faifai a cikin gabatarwar PPTX da ke cikin ma’ajin gajimare zuwa tsarin PPT. Bayan tuba, ana adana kayan fitarwa zuwa ma’ajiyar girgije.

curl -v "https://api.aspose.cloud/v3.0/slides/{sourcePPTX}/Ppt" 
-X POST \
-H  "accept: multipart/form-data" \
-H  "authorization: Bearer {accessToken}" \
-H  "Content-Type: application/json" \
-d "{}" \
-o "{resultantFile}"

Sauya ‘sourcePPTX’ tare da sunan shigarwar PPTX da ke samuwa a cikin ma’ajiyar girgije, ‘resultantFile’ tare da sunan sakamakon PPT da ‘accessToken’ tare da alamar samun damar JWT da aka samar a sama.

Kammalawa

A ƙarshe, jujjuya PPT zuwa PPTX ƙwarewa ce mai mahimmanci wanda ke ba ku damar yin amfani da ingantattun fasalulluka da dacewa da tsarin PPTX. Bugu da ƙari, wannan jujjuyawar yana rage girman sakamakon fayil ɗin PowerPoint. Hakazalika, za mu iya cimma daidaituwa ta baya lokacin da muke canza PPTX zuwa tsarin PPT. Yanzu don cim ma wannan buƙatu, ko dai gwada amfani da NET REST API wanda ke ba da ɗimbin fasali da sauƙi na haɗawa da aikace-aikacen NET. Ko, yi amfani da umarnin cURL tare da Aspose.Slides Cloud API, yana ba da damar daidaitawa da daidaitawa, yana ba ku damar yin amfani da ikon kayan aikin girgije.

Don haka zaɓi hanyar da ta fi dacewa da yanayin ci gaban ku da buƙatunku, kuma buɗe yuwuwar iyawar gabatarwar PowerPoint.

Hanyoyin haɗi masu amfani

Labarai masu alaka

Muna ba da shawarar ziyartar shafukan yanar gizo masu zuwa: