Can I concatenate PDF without a rest call in golang?

I tried Aspose.PDF for Go via C++ | Aspose API References, which doesn’t have the merge functionality and Merge Multiple PDF Files|Documentation which uses the cloud SDK. I want to merge documents without sending any data to the cloud and preferably using a library and not send any DATA via rest call. Can you help?

@npatil

Can you please specify if you are looking for a specific library in Go for merging PDFs without using REST calls?

Yes that is correct

@npatil

We are checking it and will get back to you shortly.

Hi @npatil, thank you for your interest in Aspose.PDF for Go via C++! The PDF merge functionality is not yet available in the current version (25.3), but since the library is actively evolving, we do plan to implement it in the near future. We really appreciate your interest and for choosing to use our product!

Thank you for letting me know about ASPOSE.PDF for Go via C++. I want to merge two PDFs the only documentation I found was: Merge Multiple PDF Files|Documentation. Is the merged file in this created in the cloud? Do I have to upload the files to be merged to the cloud first? My company has confidentiality concerns so I want to avoid uploading anything to an external cloud. Can you help me confirm this? Also want to know if there’s any other aspose product I can use for merging PDFs. My application is in golang

Hi @npatil,

If confidentiality is your primary concern and uploading data to the cloud is not desirable, cloud-based solutions may not be suitable, as they require uploading files. However, we’re working on adding a solution for merging PDFs in Aspose.PDF for Go via C++ that will allow you to handle files entirely locally. We truly value you as a future customer and will do our best to deliver this functionality as soon as possible.

Thank you again for your interest!

Thanks for letting me know all this. I truly appreciate your time.

Hi @npatil,

We’d like to inform you that we’ve mobilized all available resources to address your request as a priority. As a result, we’ve added the Append() function ahead of schedule in the upcoming 25.4 release, which will be available within the next few days.

With the new Append() method, you’ll be able to merge multiple PDF documents easily. Here’s a simple example demonstrating how to do that:

// MergeMultiplePDFs merges multiple PDF files into a single PDF.
func MergeMultiplePDFs(outputPath string, inputPaths []string) error {
	mergedDoc, err := New()
	if err != nil {
		return err
	}
	defer mergedDoc.Close()

	for _, path := range inputPaths {
		inputDoc, err := Open(path)
		if err != nil {
			return fmt.Errorf("failed to open %s: %w", path, err)
		}

		err = mergedDoc.Append(inputDoc)
		inputDoc.Close()
		if err != nil {
			return fmt.Errorf("failed to append %s: %w", path, err)
		}
	}

	err = mergedDoc.SaveAs(outputPath)
	if err != nil {
		return fmt.Errorf("failed to save merged PDF: %w", err)
	}

	return nil
}

We hope this helps, and we appreciate your input in making the product better.
Please feel free to share any feedback once you try it out!

Best regards,
The Aspose.PDF Team

Hi,

Thanks a lot for letting me know. This is super helpful.Just to confirm, so with this new function I will no longer need to send my PDF file data to Aspose cloud and can do the merge locally without a REST call? Also, when will this be out so I can try it out?

Best,
Niharika

Hi Niharika,

Thank you very much for your interest in our product!

Yes, you are absolutely right — with the new functionality in Aspose.PDF for Go via C++, your PDF file data is processed locally on your machine. There is no need for a REST call, and your files are not sent to the Aspose Cloud. This makes it ideal for secure or offline environments.

The new version, 25.4, is scheduled for release today, April 30th.

Please also note that there are limitations when using the library without a license. You can find more details here:
:point_right: License information

Thanks again for your interest, and we look forward to your feedback once you try it out!

Best regards,
Aspose.PDF Team