PowerPoint zuwa JPG

Maida PowerPoint zuwa JPG ta amfani da C# .NET

A cikin duniyar yau mai saurin tafiya, abun ciki na dijital ya zama jigon sadarwa. Abubuwan gabatarwa na PowerPoint (PPTX) sun zama kayan aiki mai mahimmanci ga kasuwanci da daidaikun mutane don isar da bayanai yadda ya kamata. Ana amfani da su ko’ina a cikin kasuwancin yau da muhallin ilimi, yana mai da mahimmanci a sami damar rabawa da rarraba su yadda ya kamata. Sau da yawa, ya zama dole a canza nunin faifan PowerPoint zuwa tsarin hoto kamar JPEG, musamman lokacin raba nunin faifai tare da wasu waɗanda ƙila ba su da damar yin amfani da PowerPoint. Don haka a cikin wannan labarin, za mu tattauna duk mahimman bayanan da suka shafi amfani da NET Cloud SDK don canza nunin faifan PowerPoint zuwa hotuna akan layi.

API ɗin Canjawar PowerPoint zuwa JPG

Yin amfani da Aspose.Slides Cloud SDK for .NET, juyar da nunin faifan PowerPoint zuwa hotuna JPG tsari ne mai sauƙi. Aspose.Slides Cloud yana ba da API RESTful wanda za’a iya haɗa shi cikin sauƙi tare da aikace-aikacen NET ɗin ku don canza nunin faifan PowerPoint zuwa hotuna JPG ba tare da buƙatar ƙarin software ko plugins ba.

Canza nunin faifai guda ɗaya ko gabaɗayan gabatarwa zuwa hotunan JPG.

Da fatan za a bincika ‘Aspose.Slides-Cloud’ a cikin manajan fakitin NuGet kuma danna maɓallin Ƙara Kunshin. Bugu da ƙari, yi rajistar asusu ta kan dashboard ɗin Cloud kuma sami takaddun shaidar abokin ciniki na keɓaɓɓen ku. Don ƙarin bayani, da fatan za a ziyarci sashin saurin farawa.

Canza PPT zuwa JPG ta amfani da C#

Ana amfani da snippet mai zuwa don canza nunin faifan PowerPoint zuwa tsarin JPG.

// 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);

// Karanta shigar da gabatarwar PowerPoint daga faifan gida
using var slideStream = File.OpenRead("Colorful conference presentation.pptx");
slidesApi.UploadFile("Colorful conference presentation.pptx", slideStream);

// kira API don canza duk nunin faifan PowerPoint zuwa tsarin JPG 
using var responseStream = slidesApi.DownloadPresentation("Colorful conference presentation.pptx", ExportFormat.Jpeg, null, null);

// Ajiye sakamakon sakamakon hotunan JPG zuwa faifan gida
using var pdfStream = File.Create("output.zip");
responseStream.CopyTo(pdfStream);
Powerpoint zuwa jpg

Hoto:-PowerPoint zuwa JPG samfoti.

An ba da cikakkun bayanai game da snippet code na sama.

SlidesApi slidesApi = new SlidesApi(clientID, clientSecret);

Ƙirƙiri misali na ajin SlidesApi wanda ke ɗaukar bayanan abokin ciniki azaman mahawara a cikin maginin sa.

using var slideStream = File.OpenRead("Colorful conference presentation.pptx");
slidesApi.UploadFile("Colorful conference presentation.pptx", slideStream);

Load da shigar da gabatarwar PowerPoint kuma loda shi zuwa ma’ajiyar gajimare.

using var responseStream = slidesApi.DownloadPresentation("Colorful conference presentation.pptx", ExportFormat.Jpeg, null, null);

Kira API don yin duk nunin nunin nunin PowerPoint zuwa hotunan JPG. Ana dawo da fitarwa azaman misali rafi.

using var pdfStream = File.Create("output.zip");
responseStream.CopyTo(pdfStream);

Ajiye fitarwa azaman tarihin zip akan faifan gida.

Baya ga juyar da cikakkiyar tsarin PPTX zuwa tsarin JPG, kuna samun damar canza zaɓaɓɓun nunin faifai. Layin lambar da ke gaba yana nuna yadda za ku iya jujjuya kawai, 1st, 3rd da 5th slide zuwa JPG.

using var responseStream = slidesApi.DownloadPresentation("Colorful conference presentation.pptx", ExportFormat.Jpeg, null, null,null,null,null,new List<int> { 1, 3, 5 });

Za a iya sauke samfurin gabatarwar da aka yi amfani da shi a cikin misalin da ke sama daga Taron Mai launi .

PPTX zuwa JPG ta amfani da Umarnin CURL

Wata hanya don sauya nunin faifan PowerPoint zuwa hotuna ita ce ta kiran Aspose.Slides Cloud API ta amfani da umarnin cURL. Tare da cURL, zaku iya aika buƙatun HTTP kai tsaye daga layin umarni, yana mai da shi hanya mai sauƙi da dacewa. Yanzu, da farko muna buƙatar samar da alamar tabbatarwa ta hanyar aika buƙatu zuwa ƙarshen alamar tare da SID na App da Maɓallin App.

Da fatan za a aiwatar da umarni mai zuwa don samar da accessToken.

curl -v "https://api.aspose.cloud/connect/token" \
 -X POST \
 -d "grant_type=client_credentials&client_id=ee170169-ca49-49a4-87b7-0e2ff815ea6e&client_secret=7f098199230fc5f2175d494d48f2077c" \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Accept: application/json"

Da zarar an samar da accessToken, da fatan za a aiwatar da umarni mai zuwa don canza lambar nunin faifai 4 da 8 na PowerPoint zuwa tsarin JPG.

curl -v "https://api.aspose.cloud/v3.0/slides/{sourceFile}/Jpeg?slides=4%2C8" \
-X POST \
-H  "accept: multipart/form-data" \
-H  "authorization: Bearer {accessToken}" \
-H  "Content-Type: application/json" \
-d "{  \"DefaultRegularFont\": \"string\",  \"FontFallbackRules\": [    {      \"RangeStartIndex\": 0,      \"RangeEndIndex\": 0,      \"FallbackFontList\": [        \"string\"      ]    }  ],  \"FontSubstRules\": [    {      \"SourceFont\": \"string\",      \"TargetFont\": \"string\",      \"NotFoundOnly\": true    }  ]}" \
-o "{resultantZIP}"

Sauya {sourceFile} tare da sunan shigar da gabatarwar PowerPoint a cikin ma’ajiyar girgije, {accessToken} tare da alamar samun damar JWT da aka samar a sama da, {resultantZIP} tare da sunan sakamakon fayil da za a samar a ƙayyadadden wurin tuƙi.

Kammalawa

A ƙarshe, juya nunin faifan PowerPoint zuwa hotuna JPG abu ne mai amfani wanda za’a iya amfani dashi a aikace-aikace daban-daban. Ko kuna son ƙirƙirar gabatarwa don taro ko canza nunin faifai don raba kan layi, Aspose.Slides Cloud SDK don NET yana ba da hanya mai sauƙi kuma abin dogaro don sauya fayilolin PowerPoint zuwa tsarin JPG. Kuma tare da taimakon umarnin cURL, zaku iya haɗa wannan aikin cikin sauƙi cikin ayyukanku. Don haka, tare da ƴan matakai masu sauƙi, zaku iya canza nunin faifan ku zuwa hotuna masu inganci na JPG, shirye don amfani da su ta kowace hanya da kuke buƙata.

Hanyoyin haɗi masu amfani

Labarai masu alaka

Muna ba da shawarar yin amfani da shafukan yanar gizo masu zuwa: