Error CS1513: expected at line MergePdfFiles(InputPdfFiles outputPdfFile)
using iTextSharp.text;
using iTextSharp.text.pdf;
using iTextSharp.tool.xml;
using System;
using System.IO;
using System.Web;
namespace Work_Servicing_Jobs_Due
{
public partial class Door_Inspection1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["SkipFormpage"] != null)
{
Button1_Click(null, null);
}
}
protected void Button1_Click(object sender, EventArgs e)
{
var html = "";
var Photohtml = "";
var ClientId = Session["FileClientId"].ToString();
//if (Session["OriginalForm"] == null)
//{
// html = "<div style='font-size: 14px'><table>" +
// "<tr>" +
// "<td>" +
// "<img src='http://www.securityfiresafety.co.uk/Images/Logo.jpg' style='width: 140px'/>" +
// "</td>" +
// "<td style='width:385px; text-align: center'><p><span style='color: blue; font-size: 25px'>Security</span>" +
// "<span style='color: black; font-size: 25px'> & </span>" +
// "<span style='color: red; font-size: 25px'>Fire</span>" +
// "<span style='color: green; font-size: 25px'> Safety </span>" +
// "<span style='color: black; font-size: 25px'>Ltd</span></p>" +
// "<p>39 Waterside Crescent Radstock Somerset BA3 3YD</p>" +
// "<p><span style='font-weight: bold; font-size: 16px'>07976 715157</span></p><br />" +
// "<p><span style='color: blue; font-size: 14.2px'>www.securityfiresafety.co.uk " +
// " info@securityfiresafety.co.uk</span></p></td>" +
// "<td>" +
// "<img src='http://www.securityfiresafety.co.uk/Images/Logo.jpg' style='width: 140px'/>" +
// "</td>" +
// "</tr>" +
// "</table>" +
// "<br/>" +
// "<br/>" +
// "<p>Address: {TB1}</p>" +
// "<p>Door Location: {TB2}</p>" +
// "<p>Responsible Person: {TB3}</p>" +
// "<br/>" +
// "<table>" +
// "<tr>" +
// "<td style='width: 60%'>" +
// "<div style='font-size: 14px'>Type Of Inspection: {TB4}</div>" +
// "</td>" +
// "<td style='width: 20%'>" +
// "<div style='font-size: 14px'>Our Ref: {TB5}</div>" +
// "</td>" +
// "</tr></table>" +
// "<p>Door Type: {DD1} {DD2} {DD3} {DD4}</p>" +
// "<p>Construction: {DD5} {DD6}</p>" +
// "<p>Manufacturers Label/Mark: {DD7} Code/Ref {TB6}</p>" +
// "<p>Fitters Records:</p>" +
// "<p>Door Size: Height {TB7}mm Width {TB8}mm Thickness {TB9}</p>" +
// "<p>Condition: {TB10}</p>" +
// "<p>Attachments: Peep-Hole {DD8} Letterbox {DD9} Air Vent {DD10} Window {DD11}</p>" +
// "<p>Dimensions:</p>" +
// "<p>Furniture CE Marked?: Hinges {DD12} Lock {DD13} Latch {DD14} Door Closer {DD15}</p>" +
// "<p>Number Of Hinges {DD16} All Screws Present {DD17} Closer {DD18}</p>" +
// "<br/>" +
// "<p>Intumescent Seals {DD19} Complete {DD20} Matching {DD21} Surface/Insert On {DD23}</p>" +
// "<p>Clean {DD24} Undamaged {DD25}</p>" +
// "<br/>" +
// "<p>Gaps Top {TB11}mm Hinge Edge {TB12}mm Open Edge {TB13}mm Bottom {TB14}mm</p>" +
// "<br/>" +
// "<p>Self-Close To Latch {DD26} Time {TB15}sec 60 Degrees {TB16}kg 30 Degrees {TB17}kg 1st Closure {DD27}</P>" +
// "<br/>" +
// "<p>Glazing Manufacturers Mark {DD28} FR Performance Mark {DD29}</p>" +
// "<p>Seal Complete Between Glass & Beading {TB18} Beading Fixed Firmly {DD31} Condition {TB18}</p>" +
// "<br/>" +
// "<p>Frame Condition {TB19} Frame Fixings To Wall {TB20}</p>" +
// "<p>Frame Height {TB21}mm Frame Width {TB22}mm Frame Depth {TB23}mm Door Stop Depth {TB24}mm</p>" +
// "<p>Architrave Fitted {DD32} Condition {TB25}</p>" +
// "<br/>" +
// "<p>Wall: Construction {TB26}</p>" +
// "<p>Frame/Wall Gaps Infilled {DD33}</p>" +
// "<br/>" +
// "<p>I, the undersigned, being the competent person having carried out a 'passive' inspection and assesment of the requested door, have decided that it {DD34} meet with current relavant standards</p>" +
// "<br/>" +
// "<p style='padding-top: 0px'>Engineer: Len Gunstone <img src='http://www.securityfiresafety.co.uk/Images/Signiture.jpg'/>" +
// "Date {TB27}</p><br />" +
// "<p style='font-size: 10px; text-align: center'>Registered Office: 33 Hopps Road, Kingswood, Bristol BS15 9QQ No. 8626669</p>" +
// "<br/>" +
// "</div>";
// html = html.Replace("{TB1}", TextBox1.Text);
// html = html.Replace("{TB2}", TextBox2.Text);
// html = html.Replace("{TB3}", TextBox3.Text);
// html = html.Replace("{TB4}", TextBox4.Text);
// html = html.Replace("{TB5}", TextBox5.Text);
// html = html.Replace("{TB6}", TextBox6.Text);
// html = html.Replace("{TB7}", TextBox7.Text);
// html = html.Replace("{TB8}", TextBox8.Text);
// html = html.Replace("{TB9}", TextBox9.Text);
// html = html.Replace("{TB10}", TextBox10.Text);
// html = html.Replace("{TB11}", TextBox11.Text);
// html = html.Replace("{TB12}", TextBox12.Text);
// html = html.Replace("{TB13}", TextBox13.Text);
// html = html.Replace("{TB14}", TextBox14.Text);
// html = html.Replace("{TB15}", TextBox15.Text);
// html = html.Replace("{TB16}", TextBox16.Text);
// html = html.Replace("{TB17}", TextBox17.Text);
// html = html.Replace("{TB18}", TextBox18.Text);
// html = html.Replace("{TB19}", TextBox19.Text);
// html = html.Replace("{TB20}", TextBox20.Text);
// html = html.Replace("{TB21}", TextBox21.Text);
// html = html.Replace("{TB22}", TextBox22.Text);
// html = html.Replace("{TB23}", TextBox23.Text);
// html = html.Replace("{TB24}", TextBox24.Text);
// html = html.Replace("{TB25}", TextBox25.Text);
// html = html.Replace("{TB26}", TextBox26.Text);
// html = html.Replace("{TB27}", TextBox27.Text);
// html = html.Replace("{DD1}", DropDownList1.Text);
// html = html.Replace("{DD2}", DropDownList2.Text);
// html = html.Replace("{DD3}", DropDownList3.Text);
// html = html.Replace("{DD4}", DropDownList4.Text);
// html = html.Replace("{DD5}", DropDownList5.Text);
// html = html.Replace("{DD6}", DropDownList6.Text);
// html = html.Replace("{DD7}", DropDownList7.Text);
// html = html.Replace("{DD8}", DropDownList8.Text);
// html = html.Replace("{DD9}", DropDownList9.Text);
// html = html.Replace("{DD10}", DropDownList10.Text);
// html = html.Replace("{DD11}", DropDownList11.Text);
// html = html.Replace("{DD12}", DropDownList12.Text);
// html = html.Replace("{DD13}", DropDownList13.Text);
// html = html.Replace("{DD14}", DropDownList14.Text);
// html = html.Replace("{DD15}", DropDownList15.Text);
// html = html.Replace("{DD16}", DropDownList16.Text);
// html = html.Replace("{DD17}", DropDownList17.Text);
// html = html.Replace("{DD18}", DropDownList18.Text);
// html = html.Replace("{DD19}", DropDownList19.Text);
// html = html.Replace("{DD20}", DropDownList20.Text);
// html = html.Replace("{DD21}", DropDownList21.Text);
// html = html.Replace("{DD22}", DropDownList22.Text);
// html = html.Replace("{DD23}", DropDownList23.Text);
// html = html.Replace("{DD24}", DropDownList24.Text);
// html = html.Replace("{DD25}", DropDownList25.Text);
// html = html.Replace("{DD26}", DropDownList26.Text);
// html = html.Replace("{DD27}", DropDownList27.Text);
// html = html.Replace("{DD28}", DropDownList28.Text);
// html = html.Replace("{DD29}", DropDownList29.Text);
// html = html.Replace("{DD30}", DropDownList30.Text);
// html = html.Replace("{DD31}", DropDownList31.Text);
// html = html.Replace("{DD32}", DropDownList32.Text);
// html = html.Replace("{DD33}", DropDownList33.Text);
// html = html.Replace("{DD34}", DropDownList34.Text);
//}
//// New Page Photo's
//var Pic1 = "http://www.securityfiresafety.co.uk/FireDoorPdfs/" + ClientId + "/Inspect/Main/01.jpg";
//var Pic2 = "http://www.securityfiresafety.co.uk/FireDoorPdfs/" + ClientId + "/Inspect/Main/02.jpg";
//var Pic3 = "http://www.securityfiresafety.co.uk/FireDoorPdfs/" + ClientId + "/Inspect/Main/03.jpg";
//var Pic4 = "http://www.securityfiresafety.co.uk/FireDoorPdfs/" + ClientId + "/Inspect/Main/04.jpg";
//var Pic5 = "http://www.securityfiresafety.co.uk/FireDoorPdfs/" + ClientId + "/Inspect/Main/05.jpg";
//var Pic6 = "http://www.securityfiresafety.co.uk/FireDoorPdfs/" + ClientId + "/Inspect/Main/06.jpg";
//var Pic7 = "http://www.securityfiresafety.co.uk/FireDoorPdfs/" + ClientId + "/Inspect/Main/07.jpg";
//var Pic8 = "http://www.securityfiresafety.co.uk/FireDoorPdfs/" + ClientId + "/Inspect/Main/08.jpg";
//var Pic9 = "http://www.securityfiresafety.co.uk/FireDoorPdfs/" + ClientId + "/Inspect/Main/09.jpg";
//var Pic10 = "http://www.securityfiresafety.co.uk/FireDoorPdfs/" + ClientId + "/Inspect/Main/10.jpg";
//var Pic11 = "http://www.securityfiresafety.co.uk/FireDoorPdfs/" + ClientId + "/Inspect/Main/11.jpg";
//var Pic12 = "http://www.securityfiresafety.co.uk/FireDoorPdfs/" + ClientId + "/Inspect/Main/12.jpg";
//Photohtml = "<table>" +
// "<tr>" +
// "<td>" +
// "<img src='http://www.securityfiresafety.co.uk/Images/Logo.jpg' style='width: 140px'/>" +
// "</td>" +
// "<td style='width:385px; text-align: center'><p><span style='color: blue; font-size: 25px'>Security</span>" +
// "<span style='color: black; font-size: 25px'> & </span>" +
// "<span style='color: red; font-size: 25px'>Fire</span>" +
// "<span style='color: green; font-size: 25px'> Safety </span>" +
// "<span style='color: black; font-size: 25px'>Ltd</span></p>" +
// "<p>39 Waterside Crescent Radstock Somerset BA3 3YD</p>" +
// "<p><span style='font-weight: bold; font-size: 16px'>07976 715157</span></p><br />" +
// "<p><span style='color: blue; font-size: 14.2px'>www.securityfiresafety.co.uk " +
// " info@securityfiresafety.co.uk</span></p></td>" +
// "<td>" +
// "<img src='http://www.securityfiresafety.co.uk/Images/Logo.jpg' style='width: 140px'/>" +
// "</td>" +
// "</tr>" +
// "</table>" +
// "<div style='height: 90px'></div>" +
// "<table>" +
// "<tr>" +
// "<td>" +
// "<img src=\"{Pic1}\" style='width: 240px; height: 360px' />" +
// "</td>" +
// "<td style='width: 180px'>" +
// "</td>" +
// "<td>" +
// "<img src=\"{Pic2}\" style='width: 240px; height: 360px' />" +
// "</td>" +
// "</tr>" +
// "<tr style='height: 40px'>" +
// "<td>" +
// "</td>" +
// "<td>" +
// "</td>" +
// "<td>" +
// "</td>" +
// "</tr>" +
// "<tr>" +
// "<td>" +
// "<img src=\"{Pic3}\" style='width: 240px; height: 360px' />" +
// "</td>" +
// "<td style='width: 180px'>" +
// "</td>" +
// "<td>" +
// "<img src=\"{Pic4}\" style='width: 240px; height: 360px' />" +
// "</td>" +
// "</tr></table>";
//Photohtml = Photohtml.Replace("{Pic1}", Pic1);
//Photohtml = Photohtml.Replace("{Pic2}", Pic2);
//Photohtml = Photohtml.Replace("{Pic3}", Pic3);
//Photohtml = Photohtml.Replace("{Pic4}", Pic4);
//// New Page Photo's
//Photohtml = Photohtml + "<br/><br/><br/><br/><table>" +
// "<tr>" +
// "<td>" +
// "<img src='http://www.securityfiresafety.co.uk/Images/Logo.jpg' style='width: 140px'/>" +
// "</td>" +
// "<td style='width:385px; text-align: center'><p><span style='color: blue; font-size: 25px'>Security</span>" +
// "<span style='color: black; font-size: 25px'> & </span>" +
// "<span style='color: red; font-size: 25px'>Fire</span>" +
// "<span style='color: green; font-size: 25px'> Safety </span>" +
// "<span style='color: black; font-size: 25px'>Ltd</span></p>" +
// "<p>39 Waterside Crescent Radstock Somerset BA3 3YD</p>" +
// "<p><span style='font-weight: bold; font-size: 16px'>07976 715157</span></p><br />" +
// "<p><span style='color: blue; font-size: 14.2px'>www.securityfiresafety.co.uk " +
// " info@securityfiresafety.co.uk</span></p></td>" +
// "<td>" +
// "<img src='http://www.securityfiresafety.co.uk/Images/Logo.jpg' style='width: 140px'/>" +
// "</td>" +
// "</tr>" +
// "</table>" +
// "<div style='height: 90px'></div>" +
// "<table>" +
// "<tr>" +
// "<td>" +
// "<img src=\"{Pic5}\" style='width: 240px; height: 360px' />" +
// "</td>" +
// "<td style='width: 180px'>" +
// "</td>" +
// "<td>" +
// "<img src=\"{Pic6}\" style='width: 240px; height: 360px' />" +
// "</td>" +
// "</tr>" +
// "<tr style='height: 40px'>" +
// "<td>" +
// "</td>" +
// "<td>" +
// "</td>" +
// "<td>" +
// "</td>" +
// "</tr>" +
// "<tr>" +
// "<td>" +
// "<img src=\"{Pic7}\" style='width: 240px; height: 360px' />" +
// "</td>" +
// "<td style='width: 180px'>" +
// "</td>" +
// "<td>" +
// "<img src=\"{Pic8}\" style='width: 240px; height: 360px' />" +
// "</td>" +
// "</tr></table>";
//Photohtml = Photohtml.Replace("{Pic5}", Pic5);
//Photohtml = Photohtml.Replace("{Pic6}", Pic6);
//Photohtml = Photohtml.Replace("{Pic7}", Pic7);
//Photohtml = Photohtml.Replace("{Pic8}", Pic8);
//// New Page Photo's
//Photohtml = Photohtml + "<br/><br/><br/><br/><br/><table>" +
// "<tr>" +
// "<td>" +
// "<img src='http://www.securityfiresafety.co.uk/Images/Logo.jpg' style='width: 140px'/>" +
// "</td>" +
// "<td style='width:385px; text-align: center'><p><span style='color: blue; font-size: 25px'>Security</span>" +
// "<span style='color: black; font-size: 25px'> & </span>" +
// "<span style='color: red; font-size: 25px'>Fire</span>" +
// "<span style='color: green; font-size: 25px'> Safety </span>" +
// "<span style='color: black; font-size: 25px'>Ltd</span></p>" +
// "<p>39 Waterside Crescent Radstock Somerset BA3 3YD</p>" +
// "<p><span style='font-weight: bold; font-size: 16px'>07976 715157</span></p><br />" +
// "<p><span style='color: blue; font-size: 14.2px'>www.securityfiresafety.co.uk " +
// " info@securityfiresafety.co.uk</span></p></td>" +
// "<td>" +
// "<img src='http://www.securityfiresafety.co.uk/Images/Logo.jpg' style='width: 140px'/>" +
// "</td>" +
// "</tr>" +
// "</table>" +
// "<div style='height: 90px'></div>" +
// "<table>" +
// "<tr>" +
// "<td>" +
// "<img src=\"{Pic9}\" style='width: 240px; height: 360px' />" +
// "</td>" +
// "<td style='width: 180px'>" +
// "</td>" +
// "<td>" +
// "<img src=\"{Pic10}\" style='width: 240px; height: 360px' />" +
// "</td>" +
// "</tr>" +
// "<tr style='height: 40px'>" +
// "<td>" +
// "</td>" +
// "<td>" +
// "</td>" +
// "<td>" +
// "</td>" +
// "</tr>" +
// "<tr>" +
// "<td>" +
// "<img src=\"{Pic11}\" style='width: 240px; height: 360px' />" +
// "</td>" +
// "<td style='width: 180px'>" +
// "</td>" +
// "<td>" +
// "<img src=\"{Pic12}\" style='width: 240px; height: 360px' />" +
// "</td>" +
// "</tr></table>";
//Photohtml = Photohtml.Replace("{Pic9}", Pic9);
//Photohtml = Photohtml.Replace("{Pic10}", Pic10);
//Photohtml = Photohtml.Replace("{Pic11}", Pic11);
//Photohtml = Photohtml.Replace("{Pic12}", Pic12);
//if (Session["OriginalForm"] == null)
//{
// byte[] pdf;
// var cssText = File.ReadAllText(MapPath("~/PdfStyleSheet.css"));
// using (var memoryStream = new MemoryStream())
// {
// var document = new Document(PageSize.A4, 50, 50, 50, 50);
// var writer = PdfWriter.GetInstance(document, memoryStream);
// document.Open();
// using (var cssMemoryStream = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(cssText)))
// {
// using (var htmlMemoryStream = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(html)))
// {
// XMLWorkerHelper.GetInstance().ParseXHtml(writer, document, htmlMemoryStream, cssMemoryStream);
// }
// }
// document.Close();
// var Path = "~/FireDoorPdfs/" + ClientId + "/Inspect/";
// var FileName = "Form1.pdf";
// System.IO.FileStream file = System.IO.File.Create(HttpContext.Current.Server.MapPath(Path + FileName));
// pdf = memoryStream.ToArray();
// file.Write(pdf, 0, pdf.Length);
// file.Close();
// }
//}
////////////////////////////////////////////////////////////////////////////////////////////////////////
//byte[] Photopdf;
//var PhotocssText = File.ReadAllText(MapPath("~/PdfStyleSheet.css"));
//using (var memoryStream = new MemoryStream())
//{
// var document = new Document(PageSize.A4, 50, 50, 50, 50);
// var writer = PdfWriter.GetInstance(document, memoryStream);
// document.Open();
// using (var cssMemoryStream = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(PhotocssText)))
// {
// using (var PhotohtmlMemoryStream = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(Photohtml)))
// {
// XMLWorkerHelper.GetInstance().ParseXHtml(writer, document, PhotohtmlMemoryStream, cssMemoryStream);
// }
// }
// if (Session["JustPhotos"] == null)
// {
// document.Close();
// var Path = "~/FireDoorPdfs/" + ClientId + "/Inspect/";
// var FileName = "Photo1.pdf";
// System.IO.FileStream file = System.IO.File.Create(HttpContext.Current.Server.MapPath(Path + FileName));
// Photopdf = memoryStream.ToArray();
// file.Write(Photopdf, 0, Photopdf.Length);
// file.Close();
// }
// else
// {
// document.Close();
// var Path = "~/FireDoorPdfs/" + ClientId + "/Inspect/";
// var FileName = "Finished.pdf";
// System.IO.FileStream file = System.IO.File.Create(HttpContext.Current.Server.MapPath(Path + FileName));
// Photopdf = memoryStream.ToArray();
// file.Write(Photopdf, 0, Photopdf.Length);
// file.Close();
// }
// Session["FileClientId"] = null;
// Session["OriginalForm"] = null;
//}
// Merge Pdfs
if (Session["JustPhotos"] == null)
{
var PathFirst = "";
var PathSecond = "";
var PathOutput = "";
string[] inputPdfFiles = {PathFirst, PathSecond};
string outputPdfFile = PathOutput;
MergePdfFiles(inputPdfFiles, outputPdfFile);
void MergePdfFiles(string[] strinputPdfFiles, string stroutputPdfFile)
{
// using (FileStream stream = new FileStream(outputPdfFile, FileMode.Create))
// {
// Document document1 = new Document();
// PdfCopy pdf = new PdfCopy(document1, stream);
// document1.Open();
// foreach (string strfile in inputPdfFiles)
// {
// PdfReader reader = new PdfReader(strfile);
// pdf.AddDocument(reader);
// reader.Close();
// }
// pdf.Close();
// document1.Close();
// }
//}
}
if (Session["SkipFormpage"] != null || Session["JustPhoto"] != null)
{
Response.Redirect("~/Fire/Fire Door Upload.aspx");
}
}
}
}
}