.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> Windows Application >> Post New QuestionBookmark and Share Subscribe to Forum

how to Export Merge PDF file using C#

Posted By: Naim Khan     Posted Date: September 13, 2010    Points:2   Category :Windows Application
hello friends,
I have problem with Crystal report actually i want to marge to PDF file using C#... i have two reports one is total of employees and second is Break Up of Employees salary which call annexure.. so i want to export both file in one time.. so tell me if its possible to Marge Tow PDF file into C#... if yes then please give me Code or any kind of Example..........

thanks in Advance


Responses
Author: krishana singh             
Posted Date: October 16, 2010     Points: 5   

if u have export dynamic crystal report so use below mentioned code

SqlCommand cmd = new SqlCommand("select * from tblempAttendance WHERE date between '" + dateTimePicker2.Text + "' AND '" + dateTimePicker1.Text + "' AND deptname='" + cmbdeptname.SelectedValue + "' AND empname='" + cmbemp.SelectedValue + "' ", con);
SqlDataReader dr = cmd.ExecuteReader();
DataTable dt = new DataTable();
dt.Load(dr);
rptEmpMonthSalary d = new rptEmpMonthSalary();
d.SetDataSource(dt);
crystalReportViewer1.ReportSource = d;
crystalReportViewer1.Refresh();



Author: Narayanan             
Posted Date: April 11, 2012     Points: 20   
Author: apple78             
Posted Date: July 02, 2013     Points: 20   

samle codes for pdf merging in C#
http://www.rasteredge.com/how-to/csharp-imaging/pdf-merge/

using RasterEdge.Imaging.Basic;
using RasterEdge.Imaging.Basic.Core;
using RasterEdge.Imaging.Basic.Codec;
using RasterEdge.Imaging.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

}

}
}



Author: arronlee             
Posted Date: October 21, 2013     Points: 20   

Using code to deal with the PDF merging and othe rprocessing program is too complicated for me.I have only tried to manioulate PDF files with the help of some 3rd party tools (http://www.yiigo.com/guides/csharp/how-to-process-pdf.shtml). You can google it and have a try. I hope yousuccess. Good luck.



Best regards,
Arron

Next Tomorrow is Another Day .
Author: Tommy             
Posted Date: March 27, 2014     Points: 20   

I checked out the suggestion above, and found it to be a pretty solution for PDF merging. http://www.yiigo.com/guides/vbnet/how-to-merge-pdf.shtml

On this page there is detailed sample codes for merging two or more PDF together. All you need to do is simply load your target files, merge them, and then export. Simple as that. Hope this is helpful.

Whatever will be will be.


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend