| Home >> All >> com >> lowagie |
| | com.lowagie.bc.* (50) | | com.lowagie.text.* (332) | | com.lowagie.tools.* (25) |
Package Samples:
com.lowagie.bc.asn1
com.lowagie.text
com.lowagie.text.html
com.lowagie.text.html.simpleparser
com.lowagie.text.markup
com.lowagie.text.pdf
com.lowagie.text.pdf.codec
com.lowagie.text.pdf.codec.postscript
com.lowagie.text.pdf.codec.wmf
com.lowagie.text.pdf.fonts
com.lowagie.text.pdf.hyphenation
com.lowagie.text.rtf
com.lowagie.text.rtf.document
com.lowagie.text.rtf.document.output
com.lowagie.text.rtf.field
com.lowagie.text.rtf.graphic
com.lowagie.text.rtf.headerfooter
com.lowagie.text.rtf.list
com.lowagie.text.rtf.style
com.lowagie.text.rtf.table
Classes:
Table: A Table is a Rectangle that contains Cell s, ordered in some kind of matrix. Tables that span multiple pages are cut into different parts automatically. If you want a table header to be repeated on every page, you may not forget to mark the end of the header section by using the method endHeaders() . The matrix of a table is not necessarily an m x n-matrix. It can contain holes or cells that are bigger than the unit. Believe me or not, but it took some serious thinking to make this as userfriendly as possible. I hope you wil find the result quite simple (I love simple solutions, especially for ...
BidiOrder: Reference implementation of the Unicode 3.0 Bidi algorithm. This implementation is not optimized for performance. It is intended as a reference implementation that closely follows the specification of the Bidirectional Algorithm in The Unicode Standard version 3.0. Input: There are two levels of input to the algorithm, since clients may prefer to supply some information from out-of-band sources rather than relying on the default behavior. unicode type array unicode type array, with externally supplied base line direction Output: Output is separated into several stages as well, to better enable ...
TernaryTree: Ternary Search Tree. A ternary search tree is a hibrid between a binary tree and a digital search tree (trie). Keys are limited to strings. A data value of type char is stored in each leaf node. It can be used as an index (or pointer) to the data. Branches that only contain one key are compressed to one node by storing a pointer to the trailer substring of the key. This class is intended to serve as base class or helper class to implement Dictionary collections or the like. Ternary trees have some nice properties as the following: the tree can be traversed in sorted order, partial matches (wildcard) ...
Document: A generic Document class. All kinds of Text-elements can be added to a HTMLDocument . The Document signals all the listeners when an element has been added. Remark: Once a document is created you can add some meta information. You can also set the headers/footers. You have to open the document before you can write content. You can only write content (no more meta-formation!) once a document is opened. When you change the header/footer on a certain page, this will be effective starting on the next page. Ater closing the document, every listener (as well as its OutputStream ) is closed too. Example: ...
RtfWriter: If you are creating a new project using the rtf part of iText, please consider using the new RtfWriter2. The RtfWriter is in bug-fix-only mode, will be deprecated end of 2005 and removed end of 2007. A DocWriter class for Rich Text Files (RTF). A RtfWriter can be added as a DocListener to a certain Document by getting an instance. Every Element added to the original Document will be written to the OutputStream of this RtfWriter . Example: // creation of the document with a certain size and certain margins Document document = new Document(PageSize.A4, 50, 50, 50, 50); try { // this will write RTF ...
SimpleBookmark: Bookmark processing in a simple way. It has some limitations, mainly the only action types supported are GoTo, GoToR, URI and Launch. The list structure is composed by a number of HashMap, keyed by strings, one HashMap for each bookmark. The element values are all strings with the exception of the key "Kids" that has another list for the child bookmarks. All the bookmarks have a "Title" with the bookmark title and optionally a "Style" that can be "bold", "italic" or a combination of both. They can also have a "Color" key with a value of three floats separated by spaces. The key "Open" can have ...
Section: A Section is a part of a Document containing other Section s, Paragraph s, List and/or Table s. Remark: you can not construct a Section yourself. You will have to ask an instance of Section to the Chapter or Section to which you want to add the new Section . Example: Paragraph title2 = new Paragraph("This is Chapter 2", FontFactory.getFont(FontFactory.HELVETICA, 18, Font.BOLDITALIC, new Color(0, 0, 255))); Chapter chapter2 = new Chapter(title2, 2); Paragraph someText = new Paragraph("This is some text"); chapter2.add(someText); Paragraph title21 = new Paragraph("This is Section 1 in Chapter 2", ...
RadioCheckField: Creates a radio or a check field. Example usage: Document document = new Document(PageSize.A4, 50, 50, 50, 50); PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream("output.pdf")); document.open(); PdfContentByte cb = writer.getDirectContent(); RadioCheckField bt = new RadioCheckField(writer, new Rectangle(100, 100, 200, 200), "radio", "v1"); bt.setCheckType(RadioCheckField.TYPE_CIRCLE); bt.setBackgroundColor(Color.CYAN); bt.setBorderStyle(PdfBorderDictionary.STYLE_SOLID); bt.setBorderColor(Color.red); bt.setTextColor(Color.yellow); bt.setBorderWidth(BaseField.BORDER_WIDTH_THICK); ...
Phrase: A Phrase is a series of Chunk s. A Phrase has a main Font , but some chunks within the phrase can have a Font that differs from the main Font . All the Chunk s in a Phrase have the same leading . Example: // When no parameters are passed, the default leading = 16 Phrase phrase0 = new Phrase(); Phrase phrase1 = new Phrase("this is a phrase"); // In this example the leading is passed as a parameter Phrase phrase2 = new Phrase(16, "this is a phrase with leading 16"); // When a Font is passed (explicitely or embedded in a chunk), the default leading = 1.5 * size of the font Phrase phrase3 = new Phrase("this ...
XmlWriter: A DocWriter class for XML (Remark: this class is not finished yet!). An XmlWriter can be added as a DocListener to a certain Document by getting an instance. Every Element added to the original Document will be written to the OutputStream of this XmlWriter . Example: // creation of the document with a certain size and certain margins Document document = new Document(PageSize.A4, 50, 50, 50, 50); try { // this will write XML to the Standard OutputStream XmlWriter.getInstance(document, System.out); // this will write XML to a file called text.html XmlWriter.getInstance(document, new FileOutputStream("text.xml")); ...
HtmlWriter: A DocWriter class for HTML. An HtmlWriter can be added as a DocListener to a certain Document by getting an instance. Every Element added to the original Document will be written to the OutputStream of this HtmlWriter . Example: // creation of the document with a certain size and certain margins Document document = new Document(PageSize.A4, 50, 50, 50, 50); try { // this will write HTML to the Standard OutputStream HtmlWriter.getInstance(document, System.out); // this will write HTML to a file called text.html HtmlWriter.getInstance(document, new FileOutputStream("text.html")); // this will write ...
Chapter: A Chapter is a special Section . A chapter number has to be created using a Paragraph as title and an int as chapter number. The chapter number is shown be default. If you don't want to see the chapter number, you have to set the numberdepth to 0 . Example: Paragraph title2 = new Paragraph("This is Chapter 2", FontFactory.getFont(FontFactory.HELVETICA, 18, Font.BOLDITALIC, new Color(0, 0, 255))); Chapter chapter2 = new Chapter(title2, 2); chapter2.setNumberDepth(0); Paragraph someText = new Paragraph("This is some text"); chapter2.add(someText); Paragraph title21 = new Paragraph("This is Section ...
List: A List contains several ListItem s. Example 1: List list = new List(true, 20); list.add(new ListItem("First line")); list.add(new ListItem("The second line is longer to see what happens once the end of the line is reached. Will it start on a new line?")); list.add(new ListItem("Third line")); The result of this code looks like this: First line The second line is longer to see what happens once the end of the line is reached. Will it start on a new line? Third line Example 2: List overview = new List(false, 10); overview.add(new ListItem("This is an item")); overview.add("This is another item"); ...
ListItem: A ListItem is a Paragraph that can be added to a List . Example 1: List list = new List(true, 20); list.add( new ListItem("First line") ); list.add( new ListItem("The second line is longer to see what happens once the end of the line is reached. Will it start on a new line?") ); list.add( new ListItem("Third line") ); The result of this code looks like this: First line The second line is longer to see what happens once the end of the line is reached. Will it start on a new line? Third line Example 2: List overview = new List(false, 10); overview.add( new ListItem("This is an item") ); overview.add("This ...
PdfStream: PdfStream is the Pdf stream object. A stream, like a string, is a sequence of characters. However, an application can read a small portion of a stream at a time, while a string must be read in its entirety. For this reason, objects with potentially large amounts of data, such as images and page descriptions, are represented as streams. A stream consists of a dictionary that describes a sequence of characters, followed by the keyword stream , followed by zero or more lines of characters, followed by the keyword endstream . All streams must be PdfIndirectObject s. The stream dictionary must be a ...
PushbuttonField: Creates a pushbutton field. It supports all the text and icon alignments. The icon may be an image or a template. Example usage: Document document = new Document(PageSize.A4, 50, 50, 50, 50); PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream("output.pdf")); document.open(); PdfContentByte cb = writer.getDirectContent(); Image img = Image.getInstance("image.png"); PushbuttonField bt = new PushbuttonField(writer, new Rectangle(100, 100, 200, 200), "Button1"); bt.setText("My Caption"); bt.setFontSize(0); bt.setImage(img); bt.setLayout(PushbuttonField.LAYOUT_ICON_TOP_LABEL_BOTTOM); ...
ColumnText: Formats text in a columnwise form. The text is bound on the left and on the right by a sequence of lines. This allows the column to have any shape, not only rectangular. Several parameters can be set like the first paragraph line indent and extra space between paragraphs. A call to the method go will return one of the following situations: the column ended or the text ended. I the column ended, a new column definition can be loaded with the method setColumns and the method go can be called again. If the text ended, more text can be loaded with addText and the method go can be called again. The ...
SimpleXMLParser: A simple XML and HTML parser. This parser is, like the SAX parser, an event based parser, but with much less functionality. The parser can: It recognizes the encoding used It recognizes all the elements' start tags and end tags It lists attributes, where attribute values can be enclosed in single or double quotes It recognizes the <[CDATA[ ... ]]> construct It recognizes the standard entities: &amp;, &lt;, &gt;, &quot;, and &apos;, as well as numeric entities It maps lines ending in \r\n and \r to \n on input, in accordance with the XML Specification, Section 2.11 The ...
HtmlEncoder: This class converts a String to the HTML-format of a String. To convert the String , each character is examined: ASCII-characters from 000 till 031 are represented as &#xxx; (with xxx = the value of the character) ASCII-characters from 032 t/m 127 are represented by the character itself, except for: '\n' becomes <BR>\n " becomes &quot; & becomes &amp; < becomes &lt; > becomes &gt; ASCII-characters from 128 till 255 are represented as &#xxx; (with xxx = the value of the character) Example: String htmlPresentation = HtmlEncoder.encode("Marie-Thérèse ...
Cell: A Cell is a Rectangle containing other Element s. A Cell must be added to a Table . The Table will place the Cell in a Row . Example: Table table = new Table(3); table.setBorderWidth(1); table.setBorderColor(new Color(0, 0, 255)); table.setCellpadding(5); table.setCellspacing(5); Cell cell = new Cell("header"); cell.setHeader(true); cell.setColspan(3); table.addCell(cell); cell = new Cell("example cell with colspan 1 and rowspan 2"); cell.setRowspan(2); cell.setBorderColor(new Color(255, 0, 0)); table.addCell(cell); table.addCell("1.1"); table.addCell("2.1"); table.addCell("1.2"); table.addCell("2 ...
PdfDictionary: PdfDictionary is the Pdf dictionary object. A dictionary is an associative table containing pairs of objects. The first element of each pair is called the key and the second element is called the value . Unlike dictionaries in the PostScript language, a key must be a PdfName . A value can be any kind of PdfObject , including a dictionary. A dictionary is generally used to collect and tie together the attributes of a complex object, with each key-value pair specifying the name and value of an attribute. A dictionary is represented by two left angle brackets ( >). This object is described in the ...
TIFFDirectory: A class representing an Image File Directory (IFD) from a TIFF 6.0 stream. The TIFF file format is described in more detail in the comments for the TIFFDescriptor class. A TIFF IFD consists of a set of TIFFField tags. Methods are provided to query the set of tags and to obtain the raw field array. In addition, convenience methods are provided for acquiring the values of tags that contain a single value that fits into a byte, int, long, float, or double. Every TIFF file is made up of one or more public IFDs that are joined in a linked list, rooted in the file header. A file may also contain so-called ...
PdfString: A PdfString -class is the PDF-equivalent of a JAVA- String -object. A string is a sequence of characters delimited by parenthesis. If a string is too long to be conveniently placed on a single line, it may be split across multiple lines by using the backslash character (\) at the end of a line to indicate that the string continues on the following line. Within a string, the backslash character is used as an escape to specify unbalanced parenthesis, non-printing ASCII characters, and the backslash character itself. Use of the \ ddd escape sequence is the preferred way to represent characters outside ...
TIFFConstants: A baseline TIFF reader. The reader has some functionality in addition to the baseline specifications for Bilevel images, for which the group 3 and group 4 decompression schemes have been implemented. Support for LZW decompression has also been added. Support for Horizontal differencing predictor decoding is also included, when used with LZW compression. However, this support is limited to data with bitsPerSample value of 8. When reading in RGB images, support for alpha and extraSamples being present has been added. Support for reading in images with 16 bit samples has been added. Support for the ...
| Home | Contact Us | Privacy Policy | Terms of Service |