Gunakake perpustakaan Go kanggo nggabungake DOC menyang JPG liwat REST API. Gabungke loro utawa luwih DOC berkas dadi siji berkas JPG nganggo Go.
Gabung DOC format menyang JPG kanthi gampang ing Go kode. Pustaka Go iki dirancang kanggo nggabungake pirang-pirang DOC file dadi JPG file siji nggunakake REST API, yaiku kanthi ngirim telpon HTTPS liwat Internet.
Iki minangka solusi gabungan DOC to JPG profesional Cloud-native sing nyedhiyakake programer Go kanthi keluwesan pangembangan lan fitur sing kuat. Gabung karo DOC file asring digunakake nalika perlu kanggo nggawe set JPG dokumen saka struktur sing padha, sing saben ngemot data unik. Kanthi nggabungake file, sampeyan bisa ngotomatisasi alur kerja DOC/JPG digital lan mbukak sawetara bagean rutin proses kasebut menyang piranti lunak Go ngolah dokumen kanthi cepet lan efisien.
Sampeyan bisa uga kudu nggabungake DOC file dadi siji JPG file ing akeh kasus. Contone, sampeyan bisa uga pengin nggabungake macem-macem DOC file bebarengan sadurunge nyetak utawa arsip.
Penggabungan DOC bisa dadi bagean saka pendekatan pangolahan dokumen terpadu kanggo ngasilake JPG dokumen saka sumber data sing beda-beda. tugas kuwi ndherek nggunakake DOC lengkap / JPG manipulasi Go perpustakaan sing bakal proses pesawat saka DOC file lan gabungke bebarengan ing wektu paling cendhak, mrodhuksi asil JPG kompak lan akurat.
Kanggo nindakake gabungan DOC kanggo JPG ing Go, sampeyan butuh paling ora rong DOC file sumber. Kanggo miwiti kanthi cepet, priksa conto Go kode ing ngisor iki.
import (
"os"
"github.com/aspose-words-cloud/aspose-words-cloud-go/dev/api/models"
)
config, _ := models.NewConfiguration("config.json")
wordsApi, ctx, _ := api.CreateWordsApi(config)
document, _ := os.Open("Input1.doc")
mergeProps := models.DocumentEntry{
FileReference: models.CreateRemoteFileReference("Input2.doc"),
ImportFormatMode: ToStringPointer("KeepSourceFormatting"),
}
documentEntries := []models.DocumentEntry{
mergeProps,
}
documentList := models.DocumentEntryList{
DocumentEntries: documentEntries,
}
appendDocumentOnlineOptions := map[string]interface{}{}
appendDocumentOnline := &models.AppendDocumentOnlineRequest{
Document: document,
ImageList: &documentList,
Optionals: appendDocumentOnlineOptions,
}
mergedDocs, _, _ = wordsApi.AppendDocumentOnline(ctx, appendDocumentOnline)
splitDocumentOnlineOptions := map[string]interface{}{"zipOutput": true,}
splitDocumentOnline := &models.SplitDocumentOnlineRequest{
Document: mergedDocs,
Format: ToStringPointer("jpg"),
Optionals: splitDocumentOnlineOptions,
}
_, _, _ = wordsApi.SplitDocumentOnline(ctx, splitDocumentOnline)
Run go get -v github.com/aspose-words-cloud/aspose-words-cloud-go/2007/api kanggo nginstal Aspose.Words Cloud SDK for Go. Sampeyan bisa entuk akeh informasi migunani babagan cara instalasi liyane saka bagean "How to use SDK".
Klone Aspose.Words Cloud SDK for Go saka GitHub lan gunakake ing proyek sampeyan. Tututi Instructions iki supaya cepet entuk kredensial keamanan sing dibutuhake lan ngakses REST API kita.
Deleng Repository Documentation kanggo ndeleng rincian.
Sampeyan bisa nggunakake format populer liyane: