iTextSharp.text.pdf.VerticalText.SetVerticalLayout C# (CSharp) Метод

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

public SetVerticalLayout ( float startX, float startY, float height, int maxLines, float leading ) : void
startX float
startY float
height float
maxLines int
leading float
Результат void
        public void SetVerticalLayout(float startX, float startY, float height, int maxLines, float leading)
        {
            this.startX = startX;
            this.startY = startY;
            this.height = height;
            this.maxLines = maxLines;
            Leading = leading;
        }

Usage Example

Пример #1
0
// ===========================================================================
    public override void Write(Stream stream) {
      // step 1
      using (Document document = new Document(new Rectangle(420, 600))) {
        // step 2
        PdfWriter writer = PdfWriter.GetInstance(document, stream);
        // step 3
        document.Open();
        // step 4
        BaseFont bf = BaseFont.CreateFont(
          "KozMinPro-Regular", "Identity-V", BaseFont.NOT_EMBEDDED
        );
        Font font = new Font(bf, 20);
        VerticalText vt = new VerticalText(writer.DirectContent);
        vt.SetVerticalLayout(390, 570, 540, 12, 30);
        font = new Font(bf, 20);
        vt.AddText(new Phrase(ConvertCIDs(TEXT1), font));
        vt.Go();
        vt.Alignment = Element.ALIGN_RIGHT;
        vt.AddText(new Phrase(ConvertCIDs(TEXT2), font));
        vt.Go();
      }
    }