Tabletools PDF in Landscape
Tabletools PDF in Landscape
Dave177
Posts: 7Questions: 0Answers: 0
Hi,
I've got the PDF export working on my site. I was wondering if there was a way to export the PDF in landscape mode? I have a lot of columns and they look very squeezed. A smaller font might work as well if there is a way to set this.
Thanks,
David
I've got the PDF export working on my site. I was wondering if there was a way to export the PDF in landscape mode? I have a lot of columns and they look very squeezed. A smaller font might work as well if there is a way to set this.
Thanks,
David
This discussion has been closed.
Replies
i'm wondering that too. so if anyone has an idea of how to do this or how to style the pdf in general please tell us.
i found that the code which creates the pdf is in the ZeroClipboardPdf.as file. in line 183 the pdf object is created with "pdf = new PDF( Orientation.PORTRAIT, Unit.MM, Size.A4 );". i already tried to change it to "Orientation.LANDSCAPE" but with no effect...
Just a note to include myself on the list of people interested in this feature. The ability to select landscape on a table by table basis would really complete the PDF feature for me.
Thanks for the great work
Chris
I am also very interested in ths topic.
thanks to all developer.
This is Gen and is my first post and want to say I've been a big fan of this DataTables+TableTools lately...thanks to Allan. I was able to figure out how to export to PDF in landscape. Just like jahudi did, change the ZeroClipboardPdf.as line 183 to:
pdf = new PDF( Orientation.LANDSCAPE, Unit.MM, Size.LETTER );
NOTE: I changed A4 to LETTER since I'm in the U.S.... Then, you need to "rename" the filename to ZeroClipboard.as to match the class name created in this file. Then, using Flash SDK's mxmlc command, run the following:
/Applications/Adobe\ Flash\ Builder\ 4/sdks/4.1.0/bin/mxmlc --target-player=10.0.0 -library-path+=lib ZeroClipboard.as -static-link-runtime-shared-libraries=true
ZeroClipboard.swf is created now. Rename it to copy_cvs_xls_pdf.swf and copy to the 'swf' folder. Try it now.
NOTE: You may need to empty the cache if you already tried with the previous swf before. Hope this helps.
Thanks to everyone for the input! I've just committed a number of changes to the PDf handling in TableTools, which will now allow the paper size and orientation to be set. Also the ability to include a title and summary message are present. See this post for more: http://datatables.net/forums/comments.php?DiscussionID=3726&page=1#Comment_17523 . This will be released as TableTools 2.0.1 soonish :-)
Allan