Illep
Illep

Reputation: 16841

Printing a webpage with JSF

I have seen webpage with a PDF icon, where you could click on it to print the content of that webpage.

The page i am intending to add the print feature is designed in JSF, so is there anyway where i could add a print button, to get the webpage printed ?

Upvotes: 0

Views: 2169

Answers (1)

Xorty
Xorty

Reputation: 18861

No, you must do this yourself. Get some PDF library (for example iText), then get web page output (plain HTML). Then you will have to iterate thru HTML and create PDF version (for example build iText document). You will probably have to do this yourself, because some elements (javascript powered) will need to turn into static content. Nobody but you knows how the output should look like.

Upvotes: 1

Related Questions