Esempio n. 1
0
        public void Concatinate2Pdfs()
        {
            var fileData   = PrepareMail.GetPdfData(@"c:\ezbob\test-data\imail\output.pdf");
            var concatData = PrepareMail.ConcatinatePdfFiles(new List <byte[]> {
                fileData, fileData
            });

            PrepareMail.SaveFile(concatData, @"c:\ezbob\test-data\imail\concatoutput.pdf", "concatoutput");
        }
Esempio n. 2
0
        public void TestMailmergeLetterheadPDF()
        {
            TestSetPrintPreviewEmailAddress();
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("Name,Address1,Address2,Address3,Address4,Address5,Postcode,Variable1,Date");
            sb.Append("Stas,Flat 1,6 Upperkirkgate,,Aberdeen,,AB10 1BA,Hello," + DateTime.Today.ToString("dd/MM/yyyy"));
            string csvStr = sb.ToString();

            byte[] csvData = System.Text.Encoding.ASCII.GetBytes(csvStr);
            bool   success = this.api.MailmergeLetterheadPDF(PrepareMail.GetPdfData(@"c:\ezbob\test-data\imail\test4.pdf"), csvData, "<u><h3>@Variable1@ @Name@</h3><br /><h4>this is a test mail</h4></u>", false);

            if (!success)
            {
                Log.InfoFormat(this.api.GetErrorMessage());
            }
            Assert.AreEqual(true, success);
        }