Package com.lowagie.text

Examples of com.lowagie.text.Rectangle


* @author Andrea Antonello (www.hydrologis.com)
*/
public class A1LandscapeTemplate extends AbstractPrinterPageTemplate {

    protected Rectangle getPaperSize() {
        Rectangle a1 = PageSize.A1;
        Rectangle a1Landscape = new Rectangle(0f, 0f, a1.getHeight(), a1.getWidth());
        return a1Landscape;
    }
View Full Code Here


* @author Andrea Antonello (www.hydrologis.com)
*/
public class A0LandscapeTemplate extends AbstractPrinterPageTemplate {

    protected Rectangle getPaperSize() {
        Rectangle a0 = PageSize.A0;
        Rectangle a0Landscape = new Rectangle(0f, 0f, a0.getHeight(), a0.getWidth());
        return a0Landscape;
    }
View Full Code Here

* @author Andrea Antonello (www.hydrologis.com)
*/
public class A3PortraitTemplate extends AbstractPrinterPageTemplate {

    protected Rectangle getPaperSize() {
        Rectangle a3 = PageSize.A3;
        return a3;
    }
View Full Code Here

* @author Andrea Antonello (www.hydrologis.com)
*/
public class LegalPortraitTemplate extends AbstractPrinterPageTemplate {

    protected Rectangle getPaperSize() {
        Rectangle letter = PageSize.LETTER;
        return letter;
    }
View Full Code Here

* @author Andrea Antonello (www.hydrologis.com)
*/
public class A2LandscapeTemplate extends AbstractPrinterPageTemplate {

    protected Rectangle getPaperSize() {
        Rectangle a2 = PageSize.A2;
        Rectangle a2Landscape = new Rectangle(0f, 0f, a2.getHeight(), a2.getWidth());
        return a2Landscape;
    }
View Full Code Here

* @author Andrea Antonello (www.hydrologis.com)
*/
public class A3LandscapeTemplate extends AbstractPrinterPageTemplate {

    protected Rectangle getPaperSize() {
        Rectangle a3 = PageSize.A3;
        Rectangle a3Landscape = new Rectangle(0f, 0f, a3.getHeight(), a3.getWidth());
        return a3Landscape;
    }
View Full Code Here

       
       
        //setup the paper
       
        Paper paper = new Paper();
        Rectangle pageSize = getITextPageSize(page1.getPageSize());
        paper.setSize(pageSize.getWidth(), pageSize.getHeight());
        //paper.setSize(11.7*72, 16.5*72);
        //double imageableWidth = paper.getWidth() - MARGIN*2;
        //double imageableHeight = paper.getHeight() - MARGIN*2;
        paper.setImageableArea(0, 0, paper.getWidth(), paper.getHeight() );
        pageFormat.setPaper(paper);
View Full Code Here

* @author Andrea Antonello (www.hydrologis.com)
*/
public class A4PortraitTemplate extends AbstractPrinterPageTemplate {

    protected Rectangle getPaperSize() {
        Rectangle a4 = PageSize.A4;
        return a4;
    }
View Full Code Here

   * @see com.itextpdf.text.pdf.PdfPageEventHelper#onOpenDocument(
   *      com.itextpdf.text.pdf.PdfWriter, com.itextpdf.text.Document)
   */
  public void onOpenDocument(PdfWriter writer, Document document) {
    total = writer.getDirectContent().createTemplate(100, 100);
    total.setBoundingBox(new Rectangle(-20, -20, 100, 100));


  }
View Full Code Here

  public void SetHeader(String path, Document document) {

    try {

      int spacing = 2;
      recHeader = new Rectangle(document.left(), document.top() + 20, document.right(), document.getPageSize().getTop() - topMargin);
      maxheaderLogoHeight = recHeader.getHeight() - spacing * 2;
      headerLogo = Image.getInstance(path);
      headerLogo.setAlignment(Image.LEFT);
      //headerLogo.scaleToFit(recHeader.getWidth(), maxheaderLogoHeight);
      if(path.contains("landscape")){
View Full Code Here

TOP

Related Classes of com.lowagie.text.Rectangle

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.