PowerPoint gabatarwa sun daɗe suna zama mashahuriyar hanya don isar da bayanai, amma idan kuna buƙatar wuce faifai na tsaye fa? A nan ne buƙatar canza PowerPoint zuwa SVG ta taso. SVG (Scalable Vector Graphics) yana ba da tsari mai sassauƙa da ƙarfi wanda ke ba da damar yin amfani da sauƙi da mu’amala. Ta hanyar canza gabatarwar PowerPoint zuwa SVG, zaku iya buɗe sabon matakin dama, daga haɗa hotuna a cikin shafukan yanar gizo zuwa ƙirƙirar abubuwan gani masu rai. A cikin wannan labarin, za mu bincika dalilan da ya sa canza PowerPoint zuwa SVG yana da mahimmanci da kuma yadda za ku iya cimma ta ta amfani da NET Cloud SDK.
Don haka, haɓaka roƙon gani, samun dama, da dacewa da nunin faifan ku ta hanyar canza PowerPoint zuwa SVG akan layi.
- NET Cloud SDK don PowerPoint zuwa Juyawa SVG
- Maida PPT zuwa SVG ta amfani da C# .NET
- Yadda ake Canza PPTX zuwa SVG ta amfani da Umarnin CURL
NET Cloud SDK don PowerPoint zuwa Juyawa SVG
Aspose.Slides Cloud SDK for .NET API mai arziƙi ne wanda ke ba ku damar sarrafa da kuma canza gabatarwar PowerPoint ta tsari. Tare da ilhama mai sauƙi da sauƙin amfani, zaku iya haɗa tsarin jujjuyawa cikin aikace-aikacen NET ɗinku ba tare da matsala ba. Ko kuna son canza nunin faifai guda ɗaya ko gabaɗayan gabatarwa, Aspose.Slides Cloud SDK yana ba ku damar cimma daidaitattun juzu’ai na SVG masu inganci.
Domin amfani da SDK, da fatan za a bincika ‘Aspose.Slides-Cloud’ a cikin manajan fakitin NuGet kuma danna maɓallin ‘Ƙara Kunshin’. Hakanan, ƙirƙiri asusu akan dashboard ɗin gajimare (idan ba ku da ɗaya) kuma sami keɓaɓɓen bayanan abokin ciniki na ku. Don ƙarin bayani, da fatan za a ziyarci sashin saurin farawa na takardun.
Maida PPT zuwa SVG ta amfani da C# .NET
Da fatan za a gwada amfani da snippet na lamba mai zuwa don canza gabatarwar PowerPoint zuwa tsarin SVG.
// 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);
// gabatarwar PowerPoint gabatarwa
string inputPPT = "Prismatic design.pptx";
// Kira API don canza nunin faifan PowerPoint zuwa tsarin SVG
var responseStream = slidesApi.DownloadPresentation(inputPPT, ExportFormat.Svg, null);
// Ajiye sakamakon sakamakon SVG zuwa faifan gida
using var pdfStream = File.Create("transformed.zip");
responseStream.CopyTo(pdfStream);
An bayar a ƙasa shine bayanin snippet code na sama.
SlidesApi slidesApi = new SlidesApi(clientID, clientSecret);
Ƙirƙiri wani abu na ajin SlidesApi yayin ƙaddamar da shaidar abokin ciniki azaman muhawara.
var responseStream = slidesApi.DownloadPresentation(inputPPT, ExportFormat.Svg, null);
Kira API ɗin REST don canza nunin faifan PowerPoint zuwa tsarin SVG. Ana mayar da fitarwa azaman misali rafi.
using var pdfStream = File.Create("transformed.zip");
responseStream.CopyTo(pdfStream);
Ajiye duk sakamakon SVG hotuna zuwa faifan gida azaman tarihin zip guda ɗaya.
Domin canza zaɓaɓɓun nunin faifai, da fatan za a saka fihirisar su azaman hujja zuwa hanyar Zazzagewa(…). Da fatan za a duba layin lambar da ke gaba, inda ake canza nunin faifai na 1 da na 5 kawai.
var responseStream = slidesApi.DownloadPresentation(inputPPT, ExportFormat.Svg, null, null, null, null, null, new List<int> {1,5});
Za a iya sauke gabatarwar PowerPoint da aka yi amfani da shi a cikin misalin da ke sama daga Prismatic design.
Yadda ake Canza PPTX zuwa SVG ta amfani da Umarnin CURL
Wata hanyar juyar da PowerPoint (PPTX) zuwa SVG ita ce ta yin amfani da umarnin cURL tare da Aspose.Slides Cloud API. Aspose.Slides Cloud yana ba da API RESTful wanda ke ba ku damar yin hulɗa tare da ayyukansa ta amfani da buƙatun HTTP. Ta hanyar ƙirƙirar umarnin cURL da suka dace, zaku iya haɗa aikin jujjuya cikin sauƙi cikin ayyukanku ko rubutun.
Amfanin amfani da umarnin cURL shine juzu’insu da dacewa da harsunan shirye-shirye da dandamali daban-daban. Kuna iya haɗa umarni a cikin rubutun aikin ku na yanzu, gina ayyukan aiki na al’ada, ko yin hulɗa tare da API kai tsaye daga layin umarni.
Yanzu, don farawa da wannan hanyar, da fatan za a aiwatar da umarni mai zuwa don samar da ‘accessToken’ dangane da bayanan abokin ciniki.
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 ƙirƙiri alamar samun damar JWT, da fatan za a aiwatar da wannan umarni don canza PowerPoint zuwa SVG akan layi.
curl -v "https://api.aspose.cloud/v3.0/slides/{sourcePPTX}/Svg" \
-X POST \
-H "accept: multipart/form-data" \
-H "authorization: Bearer {accessToken}" \
-H "Content-Type: application/json" \
-d "{}"
-o "{resultantSVG}"
Sauya {sourcePPTX}
tare da sunan PowerPoint da ake samu a cikin ma’ajiyar gajimare, {accessToken}
tare da alamar shiga JWT da, {resultantsSVG}
tare da sunan .zip Rumbun don ya ƙunshi sauye-sauyen hotunan SVG.
Kammalawa
A ƙarshe, jujjuya PowerPoint zuwa SVG ƙwarewa ce mai mahimmanci wacce ke ba ku damar buɗe yuwuwar gabatarwar ku ta hanyoyi daban-daban. Ko kuna buƙatar nuna abun ciki na PowerPoint akan gidan yanar gizon, saka shi a cikin zane-zane masu ƙima, ko amfani da shi a cikin wasu aikace-aikacen da ke goyan bayan tsarin SVG, tsarin jujjuya yana sauƙaƙe tare da taimakon kayan aiki kamar Aspose.Slides Cloud SDK don NET. da umarnin CURL.
Duk da haka, tare da Aspose.Slides Cloud SDK don NET, zaku iya haɗa ayyukan jujjuyawar cikin aikace-aikacen NET ɗinku ba tare da ɓata lokaci ba, yin amfani da fa’ida da fa’idodi masu kyau da SDK ke bayarwa. A gefe guda, umarnin cURL yana ba da sassauci da daidaituwa, yana ba ku damar yin hulɗa tare da Aspose.Slides Cloud API daga harsunan shirye-shirye da dandamali daban-daban. Fara amfani da wannan fasaha mai ƙarfi kuma ku fitar da yuwuwar gabatarwar ku a cikin tsarin SVG a yau.
Hanyoyin haɗi masu amfani
- Jagorar Mai Haɓakawa
- Reference
- SDK Source Code
- [Zauren Tallafawa Kyauta 6
- Live Demos
Labarai masu alaka
Muna ba da shawarar ziyartar shafukan yanar gizo masu zuwa: