Haɓaka Kalma zuwa PDF Mai Sauya Kan layi ta amfani da Ruby Cloud SDK. Yi DOCX zuwa PDF ko DOC zuwa PDF akan layi

Yadda ake canza docx zuwa pdf? | Mafi kyawun kalma zuwa mai canza pdf | Aspose.Words Cloud Ruby SDK.

Yadda ake canza docx zuwa pdf - Babban kalma zuwa mai canza pdf

Dubawa

DOCX sanannen tsari ne don takaddun Microsoft Word kuma an gabatar da shi tare da Microsoft Word 2007. Docx yana dogara ne akan buɗe XML kuma ana iya buɗe fayilolin Docx tare da Word 2007. Yayin da, PDF shine Tsarin Takardun Maɗaukaki don wakiltar takardu. Sigar fayil ce mai jujjuyawa wanda Adobe Systems ya haɓaka kuma yana iya samun kowane adadin rubutu da hotuna. Yana ba da hanya mai sauƙi, abin dogaro don ƙirƙira, gabatar da fayilolin daftarin aiki da canja wurin kayan aikin da aka shirya na firinta.

Shin kuna son canza fayil ɗin DOCX zuwa fayil ɗin PDF? Yawancin aikace-aikacen sarrafa daftarin kalmomi suna ba da damar canza Kalma zuwa tsarin fayil Pdf. Amma wannan duka tsari yana buƙatar ƙoƙari don shigar da aikace-aikacen da kuma farashin lasisi. Amma me yasa za ku biya duk lasisin samfurin lokacin da kuke buƙatar yin aiki ɗaya kawai. Bugu da ƙari, ba za a iya yin ayyukan jujjuyawar girma tare da irin wannan software na kasuwa ba. A duk irin waɗannan lokuta, Aspose.Words Cloud API yana zuwa aiki don aiwatar da tsarin fayil mai sauƙi da sauri.

Aspose.Words DOCX zuwa PDF Converter app nan take yana jujjuya fayilolin DOCX ɗinku cikin tsarin PDF tare da taimakon Ruby SDK mai buɗewa. Waɗannan SDKs da kayan aikin ana kiyaye su ta masu haɓakawa a Aspose.Words kuma suna ba da hanya mafi sauƙi don haɗa Aspose.Words Cloud API tare da aikace-aikacen ku. Kuna iya sauya fayilolin DOCX ɗinku cikin sauƙi zuwa fayil ɗin PDF tare da wannan kayan aikin Ruby SDK na kyauta. Aspose.Words yana taimaka muku canza Takardun DOCX zuwa PDFs nan take tare da babban aminci. Amfani da Aspose Cloud REST API yana yiwuwa a aiwatar da tsarin sarrafa fayil na ci gaba. Bugu da ƙari, za ku iya nemo misalan snippet code na CURL da aka ƙirƙira a ƙasan wannan shafin.

Aspose yana goyan bayan zaɓuɓɓuka da yawa don haɗa daftarin aiki sarrafa kansa zuwa aikace-aikace na dandamali da harsunan shirye-shirye. A cikin wannan labarin, za mu tattauna batutuwa masu zuwa dalla-dalla. Bari Mu Bincike.

API ɗin Canjin DOC zuwa PDF

Aspose.Words daftarin aiki Converter yana ba ku damar sauya fayilolinku daga DOCX zuwa PDF cikin inganci mai girma. Aspose.Words Cloud API yana goyan bayan nau’ikan fayil daban-daban kamar DOC, DOCX, DOCM, DOTX, RTF, ODT, OTT da sauransu da yawa. Wani bayani ne mai ban sha’awa don ƙirƙira, sarrafa da kuma canza manyan tsarin daftarin aiki na Word ta amfani da fasahar juyawa. Za ku sami ingantaccen sakamakon jujjuyawa cikin sauri.

Tare da taimakon wannan API, za mu iya aiwatar da Kalma zuwa PDF da kuma aikin jujjuyawa zuwa wasu nau’ikan ba tare da amfani da sarrafa kansa na MS Office ko wani abin dogaro ba. Domin sauƙaƙe abokan cinikinmu, an ƙirƙira takamaiman yaren shirye-shirye SDKs domin ku sami damar API daidai cikin lambar aikace-aikacenku. A cikin wannan labarin, mahimmancinmu yana kan Aspose.Words Cloud SDK don Ruby ta hanyar ba da damar masu haɓaka Ruby don aiwatar da damar sarrafa daftarin aiki a cikin aikace-aikacen Ruby cikin sauri da sauƙi, tare da farashi na farko.

Yadda ake Sanya Aspose.Words Ruby SDK?

Domin amfani da Ruby SDK don sadarwa tare da Aspose.Words Cloud REST API, da farko muna buƙatar shigar da shi akan tsarin mu. Ruby SDK yana samuwa don saukewa tare da farashin farko na sifili kamar RubyGem (an shawarta) kuma daga GitHub. Da zarar an daidaita lokacin aiki na Ruby, da fatan za a aiwatar da umarni mai zuwa a cikin tashar don aiwatar da shigarwa cikin sauri da sauƙi a cikin aikace-aikacen Ruby don kalmar docx zuwa mai sauya pdf.

gem 'aspose_words_cloud', '~> 22.3'
# or install directly
gem install aspose_words_cloud

Amma kafin ku ci gaba da shigar da Aspose.Words Cloud SDK don Ruby 2.6 ko kuma daga baya, kuna buƙatar shigar da fakitin dogaro masu zuwa akan tsarin ku.

# Following are the runtime dependencies to setup aspose_words_cloud
faraday 1.4.3 >= 1.4.1
marcel 1.0.1 >= 1.0.0
multipart-parser 0.1.1 >= 0.1.1
# Development dependencies is
minitest 5.14.4 ~> 5.11, >= 5.11.3

Wannan SDK na Ruby yana goyan bayan fiye da nau’ikan daftarin aiki 20 tare da cikakken damar karatu da rubutu. Don ƙarin cikakkun bayanai, da fatan za a ziyarci girgije aspose shafin yanar gizon takardu.

An Bayyana Biyan Kuɗi na Asusun Aspose.Cloud

Bayan shigar da duk fakitin dogaro na yanayin Ruby, mataki na gaba shine samun ClientID da ClientSecret cikakkun bayanai don yin kira zuwa APIs girgije na Aspose.Words don canza Doc zuwa Pdf. Akwai zaɓuɓɓuka guda biyu don cinye REST APIs kai tsaye ta wasu abokan ciniki kamar cURL ko amfani da SDKs na girgije. Don haka, mataki na farko shine ƙirƙirar asusu ta hanyar kewayawa Aspose.Cloud dashboard. Idan kana da asusun Google ko Microsoft to kawai danna maballin Google ko Microsoft don Shiga. In ba haka ba danna hanyar haɗi zuwa ƙirƙiri sabon asusu ta hanyar samar da bayanan da ake buƙata.

Bayan shiga cikin dashboard ɗin sararin girgije kuma danna shafin Aikace-aikace a mashigin hagu. Yanzu gungura ƙasa, danna Ƙirƙiri Sabon Application button kamar yadda aka nuna a hoton da ke ƙasa.

Takardu zuwa pdf Converter

Yanzu ƙirƙiri sabon aikace-aikacen ku ta zaɓin ma’adana na asali kamar yadda aka nuna a hoton da ke ƙasa. Hakanan zaka iya saita ma’ajiyar ɓangare na uku don loda fayilolin bayananku ta bin yadda ake saita ma’ajiyar girgije ta ɓangare na uku.

Shahararriyar takaddar docx zuwa aikace-aikacen canza pdf

Yanzu, gungura ƙasa zuwa sashin Shaidar Abokin Ciniki don kwafi Id Id da Sirrin Abokin ciniki kamar yadda aka nuna a hoton da ke ƙasa.

Takaddun shaidar abokin ciniki don mashahurin takaddun docx zuwa pdf mai sauya aikace-aikacen Ruby

Za a yi amfani da waɗannan Shaidar Abokin Ciniki don yin Kiran API zuwa Aspose.Words girgije APIs don DOCX zuwa mai sauya PDF. Na gaba, za mu ga yadda ake canza Kalma zuwa PDF ta amfani da Aspose.Words girgije SDK don Ruby.

Canza Kalma zuwa PDF a cikin Ruby

Bi umarnin da aka bayar a ƙasa don aiwatar da fayilolin MS Word DOCX zuwa PDF juyawa ta amfani da Ruby SDK don ruby akan aikace-aikacen dogo.

  1. Mataki na farko shine ƙirƙirar canjin ruby mai riƙe ClientID da ClientSecret da aka kwafi daga aspose Cloud dashboard.
  2. A na biyu, ƙirƙiri tsarin AsposeWordsCloud kuma wuce ClientID, ƙimar ClientSecret.
  3. Mataki na uku shine ƙirƙirar misalin WordsAPI
  4. Na gaba, loda tushen fayil DOCX zuwa ma’ajin gajimare ta amfani da hanyar UploadFileRequest().
  5. Yanzu, ƙirƙiri wani abu na ConvertDocumentRequest() wanda ke ɗaukar sunan DOCX, tsarin sakamako azaman mahawara
  6. A ƙarshe, fara DOCX zuwa tsarin jujjuya PDF tare da hanyar juyar da takardun shaida ().
# Load da gem ɗin, don Allah je zuwa https://github.com/aspose-words-cloud/aspose-words-cloud-ruby
require 'aspose_words_cloud'
# Yadda ake juyar da Word zuwa PDF cikin shiri.
# Samu takaddun shaidar AppKey da AppSID daga https://dashboard.aspose.cloud/applications
@app_client_id = "######-####-####-####-#########"
@app_client_secret = "##########################"
# Haɗa kaddarorin Kanfigareshan tare da WordsApi
AsposeWordsCloud.configure do |config|
  config.client_data['ClientId'] = @app_client_id
  config.client_data['ClientSecret'] = @app_client_secret
end
# Ƙirƙiri misali na WordsApi
@words_api = WordsAPI.new
# Shigar da fayil DOCX
@fileName = "mysample.docx"
# Tsarin fayil na ƙarshe
@format = "pdf"
# Loda daftarin aiki na asali zuwa wurin ajiyar girgije da aka zaɓa
@words_api.upload_file UploadFileRequest.new(File.new(@fileName, 'rb'), @fileName, nil)
# Ƙayyade sigogin jujjuya daftarin aiki farawa (takardu, tsari, hanyar fita, file_name_field_value, ajiya, fonts_location)
@request = ConvertDocumentRequest.new(File.new(@fileName, 'rb'), @format, nil, nil, nil, nil)
# Fara DOCX zuwa tsarin canza PDF
@result = @words_api.convert_document(@request)
puts @result.to_s.inspect
# Buga martanin sakamako a cikin na'ura wasan bidiyo
puts("Document successfully converted to pdf")
# Ƙarshen misali mai juyawa daftarin aiki

A sakamakon haka, mysample.pdf za a adana a tushen babban fayil ɗin aikin.

Kalma zuwa PDF ta amfani da Umarnin CURL

Yanzu bari mu bincika yadda ake canza takaddar kalma zuwa pdf ta amfani da cURL. Ana amfani da kayan aikin layin umarni na cURL don samun damar REST APIs zuwa kuma daga sabar. Tun da Aspose.Words Cloud APIs an haɓaka su kamar yadda ka’idodin REST, don haka za mu iya amfani da waɗannan API ɗin Cloud don yin ayyukan juyawa. Don yin juyi, za mu ƙirƙiri JSON Yanar Gizo Token (JWT) bisa ClientID da ClientSecret da aka dawo daga Aspose.Cloud dashboard. Da fatan za a aiwatar da umarni a cikin tashar don samar da alamar JWT kamar ƙasa.

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

Yanzu za mu yi amfani da alamar JWT a cikin umarnin da ke ƙasa don canza Kalma zuwa tsarin PDF inda ya kamata shigar da fayil ɗin DOCX akan ajiyar girgije. Sa’an nan siginar waje na nuna wurin daftarin aiki na PDF kuma tsarin shine tsarin fayil ɗin pdf na sakamakon. GetDocumentWithFormat API don canza takarda ne kuma an sanya fayil ɗin doc-to-pdf.doc zuwa tsarin PDF cikin nasara. Kuna iya bincika fayil ɗin da aka ajiye tare da sunan doc-to-pdf.pdf a cikin ma’ajiyar gajimare.

curl -X GET "https://api.aspose.cloud/v4.0/words/test_multi_pages.docx?format=pdf&outPath=doc-to-pdf.pdf" \
-H  "accept: application/octet-stream" \
-H  "Authorization: <PASTE HERE JWT Token>"

Kammalawa

A cikin labarin da ke sama, duk cikakkun bayanai masu alaƙa da Kalma zuwa PDF / DOCX zuwa PDF / DOC zuwa PDF an bayyana su ta hanyar mataki zuwa mataki ta amfani da Aspose.Words Cloud SDK for Ruby. Aspose Cloud SDKs buɗaɗɗe ne (an buga su ƙarƙashin lasisin MIT) kuma cikakken lambar Aspose.Words girgije SDK na Ruby yana kan GitHub.

Idan kuna da wasu tambayoyi, shawarwari ko sharhi game da mafi kyawun DOCX zuwa PDF Converter, Jin daɗin ziyartar tallafi forum. Kuna iya bin mu akan kafofin watsa labarun Facebook, LinkedIn, da Twitter.

Bincika

Muna kuma ba da shawarar ziyartar mahaɗa masu alaƙa: