Hi, I am trying to print a html file using javax.print see the attached code. Problems 1) The cods is working but printing the file contents (including used html tags) 2) I have specified the page format as landscape but it is printing as per default (portrait).
Your code is working perfectly. You are sending an HTML file to the printer and printing its contents. What you want to do is print how the HTML looks in a browser. You will need to render the HTML using a text component and print that.