Java PDF: orienter le texte vers le bas

Author:

Java PDF:  orienter le texte vers le bas
{filelink=10366}

/***** Code de MesExemples.com *******/
/**
 * @(#)ExempleSkew.java
 *
 *
 * @author 
 *sakoba(java.mesexemples.com) @version 1.00 2013/4/26
 */



import java.io.FileOutputStream;
import java.io.IOException;

import com.itextpdf.text.Chunk;
import com.itextpdf.text.Document;
import com.itextpdf.text.DocumentException;
import com.itextpdf.text.Paragraph;
import com.itextpdf.text.pdf.PdfWriter;

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

      document.open();

      Chunk chunk_t = new Chunk("Ceci est un chunk.");
      // Modifier la valeur de "skew"
      chunk_t.setSkew(-45f, 0f);
      document.add(chunk_t);
      
    } catch (Exception err) {
      err.printStackTrace();
    } 
    document.close();
  }
}

Leave a Reply

Your email address will not be published. Required fields are marked *