Free Support Forum - aspose.cloud

How to merge / combine two PDF documents in Apex/SalesForce with Aspose.Words REST API

Hi,
I am using Aspose to merge two pdf in Salesforce after merging pdf I am not able to get the URL through which I can download the pdf (the third one ) . can you please help me out.
the following link where I download an unmanaged package https://github.com/asposemarketplace/Aspose_for_SalesForce

where download URL is not able to open merge pdf I got following response when I click the URL

{"Document":{“DocumentProperties”:{“List”:null,“Links”:[{“Href”:“http://api.aspose.com/v1.1/pdf/Mergepdf.pdf/documentproperties",“Rel”:“self”,“Type”:null,“Title”:null}]},“Pages”:{“List”:null,“Links”:[{“Href”:“http://api.aspose.com/v1.1/pdf/Mergepdf.pdf/Pages”,“Rel”:“self”,“Type”:null,“Title”:null}]},“Links”:[{“Href”:“http://api.aspose.com/v1.1/pdf/Mergepdf.pdf”,“Rel”:“self”,“Type”:null,“Title”:null},{“Href”:“http://api.aspose.com/v1.1/pdf/Mergepdf.pdf”,“Rel”:“alternate”,“Type”:“application/pdf”,“Title”:"Download As PDF”},{“Href”:“http://api.aspose.com/v1.1/pdf/Mergepdf.pdf",“Rel”:“alternate”,“Type”:“image/tiff”,“Title”:"Download As TIFF”},{“Href”:“http://api.aspose.com/v1.1/pdf/Mergepdf.pdf",“Rel”:“alternate”,“Type”:“application/msword”,“Title”:"Download As DOC”},{“Href”:“http://api.aspose.com/v1.1/pdf/Mergepdf.pdf",“Rel”:“alternate”,“Type”:“application/vnd.ms-xpsdocument”,“Title”:"Download As XPS”},{“Href”:“http://api.aspose.com/v1.1/pdf/Mergepdf.pdf",“Rel”:“alternate”,“Type”:“application/zip”,“Title”:"Download As TeX”},{“Href”:“http://api.aspose.com/v1.1/pdf/Mergepdf.pdf",“Rel”:“alternate”,“Type”:“application/zip”,“Title”:"Download As HTML”},{“Href”:“http://api.aspose.com/v1.1/pdf/Mergepdf.pdf",“Rel”:“alternate”,“Type”:“application/pdf”,“Title”:"Download As PDF/A-1a”},{“Href”:“http://api.aspose.com/v1.1/pdf/Mergepdf.pdf",“Rel”:“alternate”,“Type”:“application/pdf”,“Title”:"Download As PDF/A-1b”}]},“Messages”:null,“Code”:200,“Status”:“OK”}

@Sonu1993

After merging the PDF documents, you will use following Aspose.Storage API to download the merged document:

GET /storage/file

Please check Download a Particular File article to find cURL Example and SDKs Examples to download a file.

@Sonu1993

Please note since Aspose.Words Cloud 19.4, we have introduced its own storage API methods. So now you do not need to use Aspose.Storage Cloud API for storage operations. Please check the cURL example to download file from storage. Please check documentation for more details.

Working with Files and Storage using Aspose.Words Cloud

// Download PDF file from Aspose Default Cloud Storage
curl -X GET "https://api.aspose.cloud/v4.0/words/storage/file/TOC_Test.pdf" 
-H "accept: application/json" 
-H "authorization: Bearer [Access_Token]" 
--output C:/Temp/TOC_Test.pdf