Aktive lesere: 6

Lokale meninger, globale ytringer

Create Array of unique values from another Array

Skrevet av | 0 kommentarer

This code snippet show you how to create an array of unique numbers from another array of numbers. The example is taken from the comment...

Les mer

Get attributes of element during SAX parsing

Skrevet av | 0 kommentarer

This example show you how to get the attributes of elements in an XML file using the SAX parser. package org.brudvik.example.xml; import...

Les mer

Build Object from XML file using SAX

Skrevet av | 0 kommentarer

This example will show you how to parse an XML file using SAX parser and build an object graph from the parsed XML. We will read the...

Les mer

Handle error when parsing an XML file using SAX

Skrevet av | 0 kommentarer

The ErrorHandler interface implemented by the org.xml.sax.helpers.DefaultHandler class provides some methods for error handling mechanism...

Les mer

Parse an XML file using SAX

Skrevet av | 0 kommentarer

This example show you how to read / parse an xml file using the SAX (Simple API for XML) parser. In the main class (SAXDemo) we create the...

Les mer

Create File Object from URL

Skrevet av | 0 kommentarer

The code snippet below use the FileUtils.toFile(URL url) method that can be found in the commons-io library to convert a URL into a File....

Les mer

Define a font for text Object in iText

Skrevet av | 0 kommentarer

We can set font style for text object such as Chunk, Phrase, Paragraph, etc using the com.itextpdf.text.Font class. We can define the font...

Les mer

Create an underlined or striked through chunk in iText

Skrevet av | 0 kommentarer

You can use the Chunk‘s setUnderline(float thickness, float yPosition) method to add underline or strike through to a chunk. A...

Les mer

Create super / subscript in iText

Skrevet av | 0 kommentarer

The following example you’ll see how to create a superscript and subscript text in the pdf document using iText. We can use the...

Les mer

Scale an image in pdf document using iText

Skrevet av | 0 kommentarer

There some methods of the com.itextpdf.text.Image class that can be use to scale the image. These methods include the following:...

Les mer
Side 1 av 4412345678910»»