java - itext Editable PDF javascript to enable or visible or show existing page on button click -


itext editable pdf javascript enable or visible or show existing page. have editable pdf template have total number of pages 2. want 1 page , on button click need 2nd page.

i have added javascript onload of pdf , set action on button click.

pdfreader reader = new pdfreader(src); reader.selectpages("1"); pdfstamper stamper = new pdfstamper(reader, new fileoutputstream(dest));   
  • list item 1) have template have total 2 pages. 2)though above code 1 page output pdf. 3)now need 2nd page in template using javascript on button click. 4) below code showing how have added script on button click.

    pdfformfield submit1 = button1.getfield();
    submit1.setaction( pdfaction.javascript("setreadonly(true,"+iscosite+");", stamper.getwriter()));


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -