function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
CRM ADMIN 8CRM 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
 
shashi lad 4shashi lad 4
Please post your code snippat to better assist you. I would use <table> <tr><td> .. always works.

thanks
shashi
CRM ADMIN 8CRM ADMIN 8
Thank you for your response. Below is the Jquery for Export to PDF code. when i use this code in my vf page it shows the headdingshorizontally.
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');
              });  
        });