troubleshooting Question

combine 2 pdf files to 1 file to print in duplex

Avatar of Tech_Men
Tech_MenFlag for Israel asked on
2 Comments1 Solution662 ViewsLast Modified:
hi there i have this code  that create the pdf file :

then i have the second pdf that need to append to the first pdf by this code :

when i open the pdf file i can only 1 page the combine not working


                report.SetParameterValue("@CustName", CustName);
                report.SetParameterValue("@CustOrderNum", CustOrderNum);
                report.SetParameterValue("@Quant", Quant);
                report.SetParameterValue("@OrderNum", OrderNum);

                //report.PrintOptions.PrinterDuplex = CrystalDecisions.Shared.PrinterDuplex.Vertical;
                //report.PrintToPrinter(0, false, 0, 0);
                report.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, "c:\\temp.pdf");

//The Second Pdf That need to Append to the first file

  DataSet ds1 = new DataSet();
                        ds1 = AgaTekensClass.AgaTekensMange.GetSketshDs(MktId);

                        Byte[] byteBLOBData;
                        byteBLOBData = null;

                        byteBLOBData = (Byte[])(ds1.Tables[0].Rows[0]["ProSketch"]);

                        FileStream fs = new FileStream("c:\\temp.pdf", FileMode.Append);
                        fs.Write(byteBLOBData, 0, byteBLOBData.Length);

Open in new window

Shahan Ayyub
Staff Software Engineer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros