Gunakake perpustakaan Go kanggo nggabungake PDF menyang gambar liwat REST API. Gabungke loro utawa luwih PDF berkas dadi siji berkas gambar nganggo Go.
Gabung PDF file kanthi gampang lan ekspor asil menyang format grafis ing Go kode. Pustaka Go iki dirancang kanggo nggabungake pirang-pirang PDF file dadi siji gambar kanthi nggunakake REST API, yaiku kanthi ngirim telpon HTTPS liwat Internet.
Iki minangka solusi gabungan PDF to Image profesional, Cloud-native sing nyedhiyakake programer Go kanthi keluwesan pangembangan lan fitur sing kuat. Kanthi nggabungake file, sampeyan bisa ngotomatisasi alur kerja PDF/Gambar digital lan mbukak sawetara bagean rutin proses kasebut menyang piranti lunak Go pangolahan PDF sing cepet lan efisien.
Sampeyan bisa uga kudu nggabungake PDF file dadi siji gambar ing pirang-pirang kasus. Contone, sampeyan bisa uga pengin nggabungake macem-macem PDF file bebarengan sadurunge nyetak utawa arsip.
Penggabungan PDF bisa dadi bagean saka pendekatan pangolahan dokumen terpadu kanggo ngasilake gambar saka sumber data sing beda. tugas kuwi ndherek nggunakake PDF lengkap / Gambar manipulasi Go perpustakaan sing bakal proses pesawat saka PDF file lan gabungke bebarengan ing wektu paling cendhak, mrodhuksi output grafis kompak lan akurat.
Kanggo nindakake gabungan PDF kanggo-Gambar ing Go, sampeyan butuh paling ora rong PDF 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.pdf")
mergeProps := models.DocumentEntry{
FileReference: models.CreateRemoteFileReference("Input2.pdf"),
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: