By Date: <-- -->
By Thread: <-- -->

new line problem



saxenashyam wrote:

hi Please xml content ;

<paragraph leading="12.0" font="Helvetica"  size="12" align="left">
  This is test docs   <newline />
  please look at it..<newline />
 </paragraph>


I have made a file Test.java. I have used this to parse test.xml The result was test.pdf

In other words: the problem can not be reproduced.
If a problem can not be reproduced, you will not get any answer!

I'm starting to get really annoyed by the increasing number of
fake (if not fake, completely undocumented) questions on this list.
br,
Bruno

Attachment: test.pdf
Description: Adobe PDF document

<itext><paragraph leading="12.0" font="Helvetica"  size="12" align="left">
  This is test docs   <newline />
  please look at it..<newline />
 </paragraph></itext>
import java.io.FileOutputStream;

import com.lowagie.text.Document;
import com.lowagie.text.PageSize;
import com.lowagie.text.pdf.PdfWriter;
import com.lowagie.text.xml.XmlParser;

/*
 * Created on 18-mei-2006
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */

/**
 *  (at) author blowagie
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class Test {

	public static void main(String[] args) {
        
        // step 1: creation of a document-object
        Document document = new Document(PageSize.A4, 80, 50, 30, 65);
        
        try {
            
            // step 2:
            // we create a writer that listens to the document
            // and directs a XML-stream to a file
            PdfWriter.getInstance(document, new FileOutputStream("test.pdf"));
             
            // step 3: we parse the document
            XmlParser.parse(document, "test.xml");
            
        }
        catch(Exception e) {
            e.printStackTrace();
            System.err.println(e.getMessage());
        }
	}
}