You need to sign in to do that
Don't have an account?
CRM ADMIN 8
Reg: Exporting DIV to PDF in Visualforce Page
Hi Team,
I develop a visualforce page and i export table DIV content to PDF but after export it shows horizontally. i want to export results in Table format.
Result:
-----------
PNR
Invoice Number
Invoice Date
Case Number
Ticket Number
Airline
Remarks
Consolidator
asdf234
2342
8/12/2015
00500123
24234
QR
Hariworld
AV45S6
123123
8/19/2015
00500131
24234
AA
Test Remakes1
Test Remakes2
Test Remakes3
Test Remakes4
Test Remakes5
I develop a visualforce page and i export table DIV content to PDF but after export it shows horizontally. i want to export results in Table format.
Result:
-----------
PNR
Invoice Number
Invoice Date
Case Number
Ticket Number
Airline
Remarks
Consolidator
asdf234
2342
8/12/2015
00500123
24234
QR
Hariworld
AV45S6
123123
8/19/2015
00500131
24234
AA
Test Remakes1
Test Remakes2
Test Remakes3
Test Remakes4
Test Remakes5
thanks
shashi
I dont want to use RenderdAs ='PDF' in vf page. export the PDF with button click on visualforce page.
Shows Headdings Like this
----------------------------------------
PNR
Invoice Number
Invoice Date
Case Number
Ticket Number
Airline
Remarks
Consolidator
I need to Show Like this
------------------------------------
PNR Invoice Number Invoice Date Case Number Ticket Number Airline Remarks Consolidator
Kindly check and fix my problem.
<!--JQuery for Export to PDF-->
$(function () {
var specialElementHandlers = {
'#editor': function (element,renderer) {
return true;
}
};
$("[id$=cmd]").click(function () {
var doc = new jsPDF();
doc.fromHTML( $('div[id$=printablediv]').html(), 15, 15, {
'width' : 170, 'elementHandlers': specialElementHandlers,
});
doc.save('Worksheet.pdf');
});
});