public static int GeneratePDF(Upsilab.Data.Model.CustomerProspect pCustomer, Upsilab.Data.Model.FirmInstitution pFirmInstitution, string pathFileName, bool forceDownload = true) //Guid idCustomer paramétre à mettre en place ??? { float y = 100; int height = 20; int width = 500; int interligne = 20; int paddingLeft = 50; FoxitPDFGenerator pdfGen = new FoxitPDFGenerator(); #region Page 1 pdfGen.AddReceuil_Title_Center_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_001"), y += 100, width, height); string[] rowContents = { string.Format(LanguageContentBL.Translate("PdfRapportMission_002"), DateTime.Now.ToShortDateString()), string.Format("{0} EC-{1}", LanguageContentBL.Translate("PdfFirm_082"),pCustomer.idCustomer) }; pdfGen.AddTableTitle(rowContents, 110, y += 80); #endregion #region Page 2 pdfGen.CreatePage(); y = 0; Dictionary<int, List<string>> data = new Dictionary<int, List<string>>(); for (int j = 0; j < 7; j++) { data.Add(j, new List<string>()); } data[0].Add(LanguageContentBL.Translate("PdfEngagement_002")); data[0].Add(pFirmInstitution.FirmInstitutionName); data[1].Add(LanguageContentBL.Translate("PdfEngagement_003")); data[1].Add(pFirmInstitution.ShareCapital); data[2].Add(LanguageContentBL.Translate("PdfEngagement_004")); data[2].Add(pFirmInstitution.RegisteredInRegister); data[3].Add(LanguageContentBL.Translate("PdfEngagement_005")); data[3].Add(pFirmInstitution.RCS); data[4].Add(LanguageContentBL.Translate("PdfEngagement_006")); data[4].Add(string.Format("{0}\n{1}\n{2}", pFirmInstitution.FirmStreet, pFirmInstitution.FirmPostCode, pFirmInstitution.FirmCity)); data[5].Add(LanguageContentBL.Translate("PdfEngagement_007")); data[5].Add(string.Format("{0} {1}", pFirmInstitution.LeaderFirstName, pFirmInstitution.LeaderName)); data[6].Add(LanguageContentBL.Translate("PdfEngagement_008")); data[6].Add(pFirmInstitution.LeaderFonction); pdfGen.AddReceuil_SubTitle_Left_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_009"), y, width, height, paddingLeft); pdfGen.GeneratePinkTable(data, 0, y += interligne * 2, width, 240, 11, false); pdfGen.AddReceuil_SubTitle_Left_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_010"), y += 260, width, height, paddingLeft); pdfGen.AddReceuil_SubTitle_Right_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_011"), y += interligne * 2, width, height); pdfGen.AddReceuil_SubTitle_Left_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_012"), y += interligne * 2, width, height, paddingLeft); var lstRowHeight = new List<float>(); data = new Dictionary<int, List<string>>(); for (int j = 0; j < 5; j++) { data.Add(j, new List<string>()); } data[0].Add(LanguageContentBL.Translate("PdfEngagement_013")); data[0].Add(pCustomer.User.EntireName); lstRowHeight.Add(30); data[1].Add(LanguageContentBL.Translate("PdfEngagement_014")); data[1].Add(pCustomer.DateOfBirth.HasValue ? pCustomer.DateOfBirth.Value.ToShortDateString() : string.Empty); lstRowHeight.Add(30); data[2].Add(LanguageContentBL.Translate("PdfEngagement_015")); data[2].Add(pCustomer.PlaceOfBirth); lstRowHeight.Add(30); data[3].Add(LanguageContentBL.Translate("PdfEngagement_016")); data[3].Add(pCustomer.Nationality); lstRowHeight.Add(30); data[4].Add(LanguageContentBL.Translate("PdfEngagement_017")); // data[4].Add(pCustomer.Adress); // fix issue 9509 var str = string.Empty; var hg = 30; if (!string.IsNullOrEmpty(pCustomer.Adress) && !string.IsNullOrEmpty(pCustomer.ZipCode) && !string.IsNullOrEmpty(pCustomer.City)) { str = string.Format("{0}\n{1}\n{2}", pCustomer.Adress, pCustomer.ZipCode, pCustomer.City); hg = 60; } else if(!string.IsNullOrEmpty(pCustomer.Adress) && !string.IsNullOrEmpty(pCustomer.ZipCode) && string.IsNullOrEmpty(pCustomer.City)) { str = string.Format("{0}\n{1}", pCustomer.Adress, pCustomer.ZipCode); hg = 45; } else if (string.IsNullOrEmpty(pCustomer.Adress) && !string.IsNullOrEmpty(pCustomer.ZipCode) && ! string.IsNullOrEmpty(pCustomer.City)) { str = string.Format("{0}\n{1}", pCustomer.ZipCode, pCustomer.City); hg = 45; } else if (!string.IsNullOrEmpty(pCustomer.Adress) && string.IsNullOrEmpty(pCustomer.ZipCode) && !string.IsNullOrEmpty(pCustomer.City)) { str = string.Format("{0}\n{1}", pCustomer.Adress, pCustomer.City); hg = 45; } else if (!string.IsNullOrEmpty(pCustomer.Adress) && string.IsNullOrEmpty(pCustomer.ZipCode) && string.IsNullOrEmpty(pCustomer.City)) { str = string.Format("{0}", pCustomer.Adress); hg = 30; } else if (string.IsNullOrEmpty(pCustomer.Adress) && !string.IsNullOrEmpty(pCustomer.ZipCode) && string.IsNullOrEmpty(pCustomer.City)) { str = string.Format("{0}", pCustomer.ZipCode); hg = 30; } else if (string.IsNullOrEmpty(pCustomer.Adress) && string.IsNullOrEmpty(pCustomer.ZipCode) && !string.IsNullOrEmpty(pCustomer.City)) { str = string.Format("{0}", pCustomer.City); hg = 30; } data[4].Add(str); lstRowHeight.Add(hg); // pdfGen.GeneratePinkTable(data, 0, y += interligne * 2, width, 150, 11, false); pdfGen.GeneratePinkTableWithRowHeight(data, 0, y += interligne * 2, width, 150, 11, false, lstRowHeight); pdfGen.AddReceuil_SubTitle_Left_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_018"), y += 200, width, height, paddingLeft); pdfGen.AddReceuil_SubTitle_Right_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_019"), y += interligne * 2, width, height); pdfGen.AddReceuil_SubTitle_Left_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_020"), y += interligne * 2, width, height, paddingLeft); #endregion #region Page 3 pdfGen.CreatePage(); y = 0; pdfGen.GenerateStyledTitle(LanguageContentBL.Translate("PdfEngagement_021"), y, 100, 300, 40, 16); pdfGen.GenerateSommaireAnalytique(0, y = +interligne * 4, width, 400, 12, new List<string>() {LanguageContentBL.Translate("PdfEngagement_095"),LanguageContentBL.Translate("PdfEngagement_096"),LanguageContentBL.Translate("PdfEngagement_097"),LanguageContentBL.Translate("PdfEngagement_098") ,LanguageContentBL.Translate("PdfEngagement_099"),LanguageContentBL.Translate("PdfEngagement_100"),LanguageContentBL.Translate("PdfEngagement_101"),LanguageContentBL.Translate("PdfEngagement_102") ,LanguageContentBL.Translate("PdfEngagement_103"),LanguageContentBL.Translate("PdfEngagement_104"),LanguageContentBL.Translate("PdfEngagement_105"),LanguageContentBL.Translate("PdfEngagement_106") ,LanguageContentBL.Translate("PdfEngagement_107"),LanguageContentBL.Translate("PdfEngagement_108") ,LanguageContentBL.Translate("PdfEngagement_109"),LanguageContentBL.Translate("PdfEngagement_110") ,LanguageContentBL.Translate("PdfEngagement_111") ,LanguageContentBL.Translate("PdfEngagement_112") }); #endregion #region Page 4 pdfGen.CreatePage(); y = 0; pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_022"), y, width, height); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_023"), y += interligne, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_024"), y += interligne * 2, width - 50, height, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_025"), y += interligne * 2, width - 50, height * 4, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_026"), y += interligne * 3, width - 50, height * 4, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_027"), y += interligne * 4, width - 50, height * 3, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_028"), y += interligne * 3, width - 50, height * 4, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_029"), y += interligne * 3, width, height); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_030"), y += interligne * 1.5f, width - 50, height, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_031"), y += interligne, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_032"), y += (interligne * 2), width - 50, height * 5, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_033"), y += (interligne * 4), width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_034"), y += (interligne * 2), width - 50, height * 2, paddingLeft); #endregion #region Page 5 pdfGen.CreatePage(); y = 0; pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_035"), y, width, height); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_036"), y += interligne * 1.5f, width - 50, height * 5, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_037"), y += interligne * 3, width - 50, height * 3, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_038"), y += interligne * 3, width - 50, height * 4, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_039"), y += interligne * 3, width, height); pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_040"), y += interligne * 1.5f, width, height); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_041"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_042"), y += interligne * 2, width, height); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_043"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_044"), y += interligne * 2, width, height); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_045"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_046"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_047"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_048"), y += interligne * 3, width, height); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_049"), y += interligne * 1.5f, width - 50, height, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_050"), y += interligne, width - 50, height, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_051"), y += interligne, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_052"), y += interligne * 1.5f, width - 50, height, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_053"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft); #endregion #region Page 6 pdfGen.CreatePage(); y = 0; pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_054"), y, width - 50, height, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_055"), y += interligne, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_056"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_057"), y += interligne * 2.5f, width - 50, height, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_058"), y += interligne, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_059"), y += interligne * 3, width, height); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_060"), y += interligne * 1.5f, width - 50, height * 4, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_061"), y += interligne * 3.5f, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_062"), y += interligne * 2.5f, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_063"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft + 15); pdfGen.AddPinkNotesRectangle(y += interligne * 1.5f, paddingLeft + 15, width - 65, 45); //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(!string.IsNullOrEmpty(pFirmInstitution.claimsName) ? pFirmInstitution.claimsName : "", y += 5, width - 65, 40, paddingLeft + 15); // string customerAdress = string.Format("{0}\n{1}\n{2}", pCustomer.Adress, pCustomer.ZipCode, pCustomer.City); string firmAdress = string.Format("{0}\n{1}\n{2}", pFirmInstitution.FirmStreet, pFirmInstitution.FirmPostCode, pFirmInstitution.FirmCity); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(!string.IsNullOrEmpty(firmAdress) ? firmAdress : "", y += 5, width - 65, 45, paddingLeft + 20); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_064"), y += (interligne * 2) + 5, width - 50, height * 2, paddingLeft + 15); pdfGen.AddPinkNotesRectangle(y += interligne * 1.5f, paddingLeft + 15, width - 65, 40); // pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(!string.IsNullOrEmpty(pFirmInstitution.claimsMail) ? pFirmInstitution.claimsMail : "", y += 5, width - 65, 40, paddingLeft + 15); //pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(!string.IsNullOrEmpty(pCustomer.User.UserEmail) ? pCustomer.User.UserEmail : "", y += 5, width - 65, 40, paddingLeft + 15); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(!string.IsNullOrEmpty(pFirmInstitution.E_mail) ? pFirmInstitution.E_mail : "", y += 5, width - 65, 40, paddingLeft + 20); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_065"), y += interligne * 2.5f, width - 50, height * 3, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_066"), y += interligne * 2.5f, width - 50, height * 3, paddingLeft); // #endregion #region Page 7 // pdfGen.CreatePage(); y = 0; pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_067"), y, width, height); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_068"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_069"), y += interligne * 2, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_070"), y += interligne * 2, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_071"), y += interligne * 3, width, height); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_072"), y += interligne * 1.5f, width - 50, height * 3, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_073"), y += interligne * 2.5f, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_074"), y += interligne * 3, width, height); pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_075"), y += interligne * 1.5f, width, height); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_076"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_077"), y += interligne * 2.5f, width, height); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_078"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_079"), y += interligne * 2f, width, height); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_080"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_081"), y += interligne * 3, width, height); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_082"), y += interligne * 1.5f, width - 50, height, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_083"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft); #endregion #region Page 8 pdfGen.CreatePage(); y = 0; pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_084"), y += interligne, width, height); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_085"), y += interligne * 1.5f, width - 50, height * 2, paddingLeft); pdfGen.AddReceuil_DefaultText_Justify_CalibriBold_Label(LanguageContentBL.Translate("PdfEngagement_086"), y += interligne * 2, width, height); data = new Dictionary<int, List<string>>(); data.Add(0, new List<string>()); data[0].Add(LanguageContentBL.Translate("PdfEngagement_087")); // fait à data[0].Add(" "); pdfGen.GeneratePinkTable(data, 0, y += interligne * 2, width, 30, 11, false); data = new Dictionary<int, List<string>>(); data.Add(0, new List<string>()); data[0].Add(LanguageContentBL.Translate("PdfEngagement_088"));//en data[0].Add(" "); data[0].Add(LanguageContentBL.Translate("PdfEngagement_089")); pdfGen.GeneratePinkTable3cols(data, 0, y += interligne * 3, width, 30, 11, false); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_090"), y += interligne * 2.5f, width - 50, height * 2); pdfGen.AddReceuil_DefaultText_Justify_Calibri_Label(LanguageContentBL.Translate("PdfEngagement_091"), y, width - 50, height * 2, paddingLeft * 5); data = new Dictionary<int, List<string>>(); data.Add(0, new List<string>()); data[0].Add(LanguageContentBL.Translate("PdfEngagement_092")); data[0].Add((pCustomer.ConfidentialityAgreement != null && pCustomer.ConfidentialityAgreement.User != null) ? pCustomer.ConfidentialityAgreement.User.EntireName : pCustomer.User1.EntireName); data.Add(1, new List<string>()); data[1].Add(LanguageContentBL.Translate("PdfEngagement_093")); data[1].Add(" "); data.Add(2, new List<string>()); data[2].Add(LanguageContentBL.Translate("PdfEngagement_094")); data[2].Add(DateTime.Now.ToShortDateString()); pdfGen.GeneratePinkTable2(data, 0, y += interligne * 1.5f, 230, 100, 11, false); data = new Dictionary<int, List<string>>(); data.Add(0, new List<string>()); data[0].Add(LanguageContentBL.Translate("PdfEngagement_092")); data[0].Add(pCustomer.User.EntireName); data.Add(1, new List<string>()); data[1].Add(LanguageContentBL.Translate("PdfEngagement_093")); data[1].Add(""); data.Add(2, new List<string>()); data[2].Add(LanguageContentBL.Translate("PdfEngagement_094")); data[2].Add(DateTime.Now.ToShortDateString()); pdfGen.GeneratePinkTable2(data, paddingLeft * 5, y, 230, 100, 11, false); float x = 18; pdfGen.AddRecueil_Notes_Rectangle(y += interligne * 6, x, 200, 120); if (forceDownload) { //Ces textes sont automatiques pour la signature en ligne // pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Lu_Et_Accepte"), y + 5, 200, 20, x + 5); pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Lu_Et_Approuve"), y + 20, 145, 20, x + 5); pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Date"), y + 35, 145, 20, x + 5); } x = (paddingLeft * 5) + 13; pdfGen.AddRecueil_Notes_Rectangle(y, x, 200, 120); if (forceDownload) { //Ces textes sont automatiques pour la signature en ligne pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Lu_Et_Accepte"), y + 5, 200, 20, x + 5); pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Lu_Et_Approuve"), y + 20, 145, 20, x + 5); pdfGen.AddReceuil_DetailText_Left_Arial_Label(LanguageContentBL.Translate("Pdf_Date"), y + 35, 145, 20, x + 5); } #endregion if (forceDownload) { pdfGen.GeneratePdfToWeb("EngagementConfidentialiteSignature.pdf"); } else { pdfGen.GeneratePdf(pathFileName); } return pdfGen.PageCount; }