Lines Matching refs:page

35  * create a new document and then for every page you want to add you start a page,
36 * write content to the page, and finish the page. After you are done with all
39 * created one by one, i.e. you can have only a single page to which you are
49 * // crate a page description
52 * // start a page
53 * Page page = document.startPage(pageInfo);
55 * // draw something on the page
57 * content.draw(page.getCanvas());
59 * // finish the page
60 * document.finishPage(page);
98 * Starts a page using the provided {@link PageInfo}. After the page
99 * is created you can draw arbitrary content on the page's canvas which
101 * drawing the content you should finish the page by calling
102 * {@link #finishPage(Page)}. After the page is finished you should
103 * no longer access the page or its canvas.
106 * Also do not call this method if the last page returned by this method
110 * @param pageInfo The page info. Cannot be null.
111 * @return A blank page.
119 throw new IllegalArgumentException("page cannot be null");
129 * Finishes a started page. You should always finish the last started page.
132 * You should not finish the same page more than once.
135 * @param page The page. Cannot be null.
139 public void finishPage(Page page) {
141 if (page == null) {
142 throw new IllegalArgumentException("page cannot be null");
144 if (page != mCurrentPage) {
145 throw new IllegalStateException("invalid page");
147 if (page.isFinished()) {
148 throw new IllegalStateException("page already finished");
150 mPages.add(page.getInfo());
153 page.finish();
161 * Also do not call this method if a page returned by {@link #startPage(
192 * <strong>Note:</strong> Do not call this method if the page
230 * Throws an exception if the last started page is not finished.
234 throw new IllegalStateException("Current page not finished!");
278 * Gets the page width in PostScript points (1/72th of an inch).
280 * @return The page width.
287 * Gets the page height in PostScript points (1/72th of an inch).
289 * @return The page height.
297 * This is the area that contains the page content and is relative to
298 * the page top left.
307 * Gets the page number.
309 * @return The page number.
322 * Creates a new builder with the mandatory page info attributes.
324 * @param pageWidth The page width in PostScript (1/72th of an inch).
325 * @param pageHeight The page height in PostScript (1/72th of an inch).
326 * @param pageNumber The page number.
330 throw new IllegalArgumentException("page width must be positive");
333 throw new IllegalArgumentException("page width must be positive");
345 * This is the area that contains the page content and is relative to
346 * the page top left.
348 * @param contentRect The content rectangle. Must fit in the page.
355 throw new IllegalArgumentException("contentRect does not fit the page");
377 * This class represents a PDF document page. It has associated
381 * a page has
390 * @param canvas The canvas of the page.
399 * Gets the {@link Canvas} of the page.
426 * @return The canvas if the page is not finished, null otherwise.
435 * Gets the {@link PageInfo} with meta-data for the page.
437 * @return The page info.