Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

15.2. Creating a document

Documents are generated by facelets documents using tags in the https://jboss.com/products/seam/pdf namespace. Documents should always have the document tag at the root of the document. The document tag prepares Seam to generate a document into the DocumentStore and renders an HTML redirect to that stored content. The following is a a small PDF document consisting only a single line of text:
<p:document xmlns:p="https://jboss.com/products/seam/pdf">                                                      
   The document goes here.                                                                                             
</p:document>

15.2.1. p:document

The p:document tag supports the following attributes:
type
The type of the document to be produced. Valid values are PDF, RTF and HTML modes. Seam defaults to PDF generation, and many of the features only work correctly when generating PDF documents.
pageSize
The size of the page to be generate. The most commonly used values would be LETTER and A4. A full list of supported pages sizes can be found in com.lowagie.text.PageSize class. Alternatively, pageSize can provide the width and height of the page directly. The value "612 792", for example, is equizalent to the LETTER page size.
orientation
The orientation of the page. Valid values are portrait and landscape. In landscape mode, the height and width page size values are reversed.
margins
The left, right, top and bottom margin values.
marginMirroring
Indicates that margin settings should be reversed an alternating pages.
Document metadata is also set as attributes of the document tag. The following metadata fields are supported:
title
subject
keywords
author
creator

 
 
  Published under the terms of the Open Publication License Design by Interspire