cancel
Showing results for 
Search instead for 
Did you mean: 

PDF file

Former Member
0 Kudos

hi all,

how can i open the pdf file through the button click(ie function call)?

Thanks,

John R

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi John,

Please check the function code below to open PDF file from button,

function Print()

{

var QryObj=document.generatePDFfileApp.getQueryObject();

QryObj.setParam(1,vCurrentDate);

document.generatePDFfileApp.executeCommand();

window.open("../reports/PDF"vCurrentDate".pdf");

}

or

function Print()

{

document.generatePDFfileApp.executeCommand();

window.open("pdfFile.pdf");

}

-Here Print() is Function name given to button.

-"generatePDFfileApp" is an Applet that calls the Xacute Query which has PDF file Generation Transaction.

- In transaction u have to use Image saver for storing Path of PDF File.And u need to Specify that file name in window.open() with .pdf Extention

-Above Example has timestamp attached each PDF generation hence passing vCurrentDate variable which holds date and time stamp.

- See the Second fuction code to understand better.

Former Member
0 Kudos

Hi

Set an onClick event for the button and add

window.open('<pdffilename>','_blank');

inside the function

Regards,

Ravi Kumar.