End Of Line: Text_Render_Mode : Chunk « PDF RTF « Java






End Of Line: Text_Render_Mode

End Of Line: Text_Render_Mode

import java.awt.Color;
import java.io.FileOutputStream;

import com.lowagie.text.Chunk;
import com.lowagie.text.Document;
import com.lowagie.text.pdf.PdfContentByte;
import com.lowagie.text.pdf.PdfWriter;

public class EndOfLineWithTextRenderModePDF {
  public static void main(String[] args) {
    Document document = new Document();
    try {
      PdfWriter.getInstance(document, new FileOutputStream("EndOfLineWithTextRenderModePDF.pdf"));

      document.open();

      Chunk chunk = new Chunk("1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0");
      chunk.setTextRenderMode(PdfContentByte.TEXT_RENDER_MODE_STROKE, 0.3f, new Color(30, 30, 30));
      document.add(chunk);

    } catch (Exception e) {
      System.err.println(e.getMessage());
    }
    document.close();
  }
}
           
       








itext.zip( 1,748 k)

Related examples in the same category

1.Adding More than One Chunk to PDF documentAdding More than One Chunk to PDF document
2.End Of LineEnd Of Line