Need to download form page as PDF

malaisamyj
Tera Contributor

Hi All,

I have a requirement as below,

I want to create an UI action to download the form page as PDF,.

I have tried the below UI action code.

var urlString =   gs.getProperty('glide.servlet.uri')+current.getTableName()+'.do?PDF&sys_id='+current.sys_id+'';

action.setRedirectURL(urlString);

Its working fine. But in PDF file it contains Table name,run date and time, report title and Run by. I dont want to see these details in my PDF file . is it possible to avoid these details?

And one more thing , In my form i have lot of sections.   But as soon as press Download PDF button it has to create PDF file for specific section without the related list tables

is it possible to achieve?

Thanks,

Malaisamy

8 REPLIES 8

Shishir Srivast
Mega Sage

Hello,



I believe, whatever field you don't want you can remove them and get a PDF, as far as I know it will give you the Form view as PDF (whatever field details you have on the form).



I am not sure if this way you can get the leverage of printing the related table as well.



Click on top right corner of Gear Icon -> Settings and in General you can find the option to Print the friendly version as PDF, that will include the sections and related lists as well.



find_real_file.png



find_real_file.png


Hi Shishir,



I need to create UI action.As soon as user clicks the UI action particular section(Consider only the second section ) of my has to be downloaded as PDF without these details "Table name,run date and time, report title and Run by" . Is it possible????????? If possible please share   me the code?




Thanks,



Malaisamy


There is a system property, pls see below


find_real_file.png


find_real_file.png


Hi moulik,



This is really good. Now i am not getting those details. Thank you so much.



One more thing how to change the name of PDF file which is getting downloaded?



is it possible to print particular section in form as PDF?



Thanks,


Malaisamy