List of usage examples for com.lowagie.text RectangleReadOnly RectangleReadOnly
public RectangleReadOnly(float urx, float ury)
RectangleReadOnly
-object starting from the origin (0, 0). From source file:com.amphisoft.epub2pdf.content.XhtmlHandler.java
License:Open Source License
public static void setDefaultPageSize(float widthPt, float heightPt) { pageSize = new RectangleReadOnly(widthPt, heightPt); }
From source file:com.amphisoft.epub2pdf.Converter.java
License:Open Source License
private void setPageSize(Properties props) { String pageSizeStr = props.getProperty("page.size").trim(); pageSizeStr = pageSizeStr.toLowerCase(); if (pageSizeStr.contains("x")) { int sepIdx = pageSizeStr.indexOf('x'); try {//ww w. java 2 s.c o m String widthStr = pageSizeStr.substring(0, sepIdx); String heightStr = pageSizeStr.substring(sepIdx + 1); Length width = Length.fromString(widthStr); Length height = Length.fromString(heightStr); System.err.println("Page size (w x h): " + width.toString() + " x " + height.toString()); pageSize = new RectangleReadOnly(width.toPoints().getMagnitude(), height.toPoints().getMagnitude()); } catch (IndexOutOfBoundsException ioobe) { pageSizeErrorNotice(); } } else { pageSizeErrorNotice(); } }
From source file:de.dhbw.humbuch.util.PDFHandler.java
/** * Create a document with the specified sizes and margins. This document is the internal representation * of the PDF.// w w w . j a va 2s . co m */ public PDFHandler() { this.document = new Document(new RectangleReadOnly(595, 842), 30f, 30f, 25f, 35f); }