iTextSharp.text.Document.AddProducer C# (CSharp) Метод

AddProducer() публичный Метод

Adds the producer to a Document.
public AddProducer ( ) : bool
Результат bool
        public bool AddProducer()
        {
            return Add(new Meta(Element.PRODUCER, Version.GetInstance().GetVersion));
        }

Usage Example

Пример #1
0
        /// <summary>
        /// PDF生成
        /// </summary>
        public void MakePDF(List<System.Drawing.Image> list)
        {
            Document document = new Document(PageSize.A3);//创建一个Document实例
            PdfWriter writer = PdfWriter.GetInstance(document, new FileStream(PDFSavePath, FileMode.Create));//创建Writer实例

            document.Open();

            #region 写入一些数据,包括:作者、标题、摘要、关键词、创建者、生产者、创建时间、头信息

            document.AddAuthor("重齿风电");
            document.AddCreationDate();
            document.AddCreator("重齿风电");
            //document.AddHeader("QQ", "346163801");
            //document.AddHeader("Email", "*****@*****.**");
            document.AddKeywords("重齿风电");
            document.AddProducer();
            document.AddSubject("重齿风电");
            document.AddTitle("重齿风电");

            #endregion

            BaseFont baseFont = CreateChineseFont();

            iTextSharp.text.Font titleFont = new iTextSharp.text.Font(baseFont, 22, iTextSharp.text.Font.BOLD);
            iTextSharp.text.Font fontUnderLine = new iTextSharp.text.Font(baseFont, 12, iTextSharp.text.Font.UNDERLINE);
            iTextSharp.text.Font normalFont = new iTextSharp.text.Font(baseFont, 12);
            iTextSharp.text.Font normalRedFont = new iTextSharp.text.Font(baseFont, 12, iTextSharp.text.Font.NORMAL | iTextSharp.text.Font.BOLD, BaseColor.RED);
            //float titleLineHeight = 45f;
            float normalLineHeight = 25f;
            Paragraph pBlank = new Paragraph(" ", normalFont);
            pBlank.Leading = normalLineHeight;
            foreach (var im in list)
            {
                iTextSharp.text.Image jpeg = iTextSharp.text.Image.GetInstance(DoConvert(im,827,1169,80), BaseColor.WHITE);
                jpeg.Alignment = Element.ALIGN_CENTER;
                document.Add(jpeg);
            }

            document.Close();
        }
All Usage Examples Of iTextSharp.text.Document::AddProducer