File file = new File("xxxxxxx");
String y1 = "<html><body><table><tr><td><textarea>Hello <br /> world1</textarea></td></tr></table></body></html>";
FileWriter fw = new FileWriter(file);
fw.write(y1);
fw.close();
FileReader r = new FileReader(file);
Tidy tidy = new Tidy();
tidy.setXHTML(true);
tidy.setShowWarnings(false);
tidy.setQuiet(true);
tidy.setHideComments(true);
String tempFile = file + ".tmpPdf";
FileWriter w = new FileWriter(tempFile);
tidy.parse(r, w);
r.close();
w.close();
I want the output in .tmpPdf file to be "Hello
world1". Here, "Hello world" should have
in between literally in my output.
Where you have this line
I think you want to have this
You want a new-line (and it's within a
textarea
tag).