On button click from another JSP, show a JSP in PDF format

Viewed 17

I have a JSP page and there are two buttons belongs to two different forms like below:

<form action="abcd1" method="post">
<button type="submit" class="submitbtn" id="btn1">View</button>
</form><br>
<form action="abcd1" method="post">
<button type="submit" class="submitbtn" id="btn2">Generate PDF</button>
</form>

Now I want the content of the 'btn2' button will show the same content as 'btn1' but in PDF format.

I don't want to use itextPdf because there is a complex chart in btn1 buttons requesting JSP. And I can't make it on itextPdf.

So, that I just want a simple solution as of now. Please help me out.

0 Answers
Related