iTextSharp.text.pdf.ColumnText.AddWaitingPhrase C# (CSharp) Метод

AddWaitingPhrase() приватный Метод

private AddWaitingPhrase ( ) : void
Результат void
    private void AddWaitingPhrase() {
        if (bidiLine == null && waitPhrase != null) {
            bidiLine = new BidiLine();
            foreach (Chunk ck in waitPhrase.Chunks) {
                bidiLine.AddChunk(new PdfChunk(ck, null));
            }
            waitPhrase = null;
        }
    }

Usage Example

Пример #1
0
 /** Gets the width that the line will occupy after writing.
  * Only the width of the first line is returned.
  * @param phrase the <CODE>Phrase</CODE> containing the line
  * @param runDirection the run direction
  * @param arabicOptions the options for the arabic shaping
  * @return the width of the line
  */    
 public static float GetWidth(Phrase phrase, int runDirection, int arabicOptions) {
     ColumnText ct = new ColumnText(null);
     ct.AddText(phrase);
     ct.AddWaitingPhrase();
     PdfLine line = ct.bidiLine.ProcessLine(0, 20000, Element.ALIGN_LEFT, runDirection, arabicOptions, 0, 0, 0);
     if (line == null)
         return 0;
     else
         return 20000 - line.WidthLeft;
 }