We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Merging pdfs and docs together

Thread ID:

Created:

Updated:

Platform:

Replies:

109384 Jun 10,2013 09:57 PM UTC Aug 20,2013 04:27 AM UTC ASP.NET MVC (Classic) 3
loading
Tags: PDF
Alexander McLin
Asked On June 10, 2013 09:57 PM UTC

I have several Word and Pdf documents I would like to merge together. My idea was to load the Word document into WordDocument and convert into Pdfs via the DocToPdfConverter class, then use PdfDocument.Merge to assemble the pdfs together.

This does not work since the Merge method expects PdfLoadedDocument instead of PdfDocument.

What is the best way to accomplish this?

Praveenkumar H [Syncfusion]
Replied On June 17, 2013 04:11 AM UTC

Hi Alexander,

Thank you for using Syncfusion product,

We have attached sample program to create merged pdf document from several Word Document.

Please let us know if you have any concern.

With Regards,
Praveen


Doc to pdf with merge_6f691489.zip

Abigail
Replied On August 14, 2013 09:24 AM UTC

Here is the demo code to merge pdf:
namespace RE__Test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

public static string FolderName = "c:/";

private void button1_Click(object sender, EventArgs e)
{
string fileName1 = FolderName + "Sample1.pdf";
string fileName2 = FolderName + "Sample2.pdf";
string fileNameMerged = FolderName + "Merged.pdf";

REDocument doc1 = REFile.OpenDocumentFile(fileName1, new PDFDecoder());//use PDFDecoder open one pdf file

REDocument doc2 = REFile.OpenDocumentFile(fileName2, new PDFDecoder());//use PDFDecoder open another pdf file

BaseDocument docMerged = doc1.MergeDocument(doc2);//merge two pdf

REFile.SaveDocumentFile((REDocument)docMerged, fileNameMerged, new PDFEncoder());//save new pdf


Praveenkumar H [Syncfusion]
Replied On August 20, 2013 04:27 AM UTC

Hi Abigail,

Thank you for your update.

With Regards,
Praveen



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;