Exemple #1
0
        private iTextSharp5.text.pdf.PdfPTable WriteCallHeader(BaseForPaper call, SubmitterType submitter, Dictionary <SubmissionTranslations, string> translations)
        {
            iTextSharp5.text.pdf.PdfPTable table = GetTable(1);
            table.HorizontalAlignment = Element.ALIGN_CENTER;

            String callName = "";

            switch (call.Type)
            {
            case CallForPaperType.CallForBids:
                if (string.IsNullOrEmpty(call.Edition))
                {
                    callName = String.Format(translations[SubmissionTranslations.CallTitle], "\r\n" + call.Name);
                }
                else
                {
                    callName = String.Format(translations[SubmissionTranslations.CallTitleAndEdition], "\r\n" + call.Name, call.Edition);
                }
                break;

            case CallForPaperType.RequestForMembership:
                callName = String.Format(translations[SubmissionTranslations.RequestTitle], "\r\n" + call.Name);
                break;
            }
            PdfPCell titleCell = new PdfPCell(new Phrase(callName, GetFont(ItemType.Title)));

            titleCell.Border = 0;
            table.AddCell(titleCell);
            return(table);
        }
Exemple #2
0
        protected override void RenderDocument(iTS.Document doc, PdfWriter pdfWriter)
        {
            PdfPTable contentTable = new iTS.pdf.PdfPTable(1);

            contentTable.TotalWidth = _template.Settings.Width - (_template.Settings.MarginLeft + _template.Settings.MarginRight);

            contentTable.AddCell(RenderBody());

            doc.Add(contentTable);
        }