Java PDF: Modifier la police et la rotation avec setSkew()

Author:

Java PDF: Modifier la police et la rotation avec setSkew()
{filelink=10364}

/***** 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:/ExempleSkew.pdf"));

      document.open();

      Chunk italic = new Chunk("Ceci est un chunk.");
      italic.setSkew(0f, 12f);
      document.add(italic);
      
    } catch (Exception err) {
      err.printStackTrace();
    } 
    document.close();
  }
}

Leave a Reply

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