Customizing PDF

Customizing PDF

TheDefiantTheDefiant Posts: 3Questions: 0Answers: 0
edited January 2014 in TableTools
Hi Allan,

First of all a BIG Thanks is very small to you for this Wonderful plugin, this made my life very easy.. :)

I’m using this in one of my projects and I’m able to use it in all possible ways, while using export functionality, I found we are limited to use only a few formatting settings(sorry If I’m missing anything in this forum, please guide me). I read in some discussions we can achieve this by modifying Action Script; if I’m not wrong, it would be great if you can walk through the steps to modify or how you implemented this export functionality.

I have a requirement to export the entire table as is along with the colors and other formatting. Please help..

Regards,
Srikanth

Replies

  • Steve_WebtronSteve_Webtron Posts: 19Questions: 0Answers: 0
    First, easiest answer: Print to, and use a PDF printer? (built in to chrome)
    Sorry I have not yet formatted the PDF's using anything dataTables specific.
  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    TableTools uses the AlivePDF library ( http://alivepdf.bytearray.org ) for creating PDFs. The AS3 code used by TableTools is here: https://github.com/DataTables/TableTools/blob/master/media/as3/ZeroClipboardPdf.as .

    I don't have an example of how to modify the code at the moment. I'd need to read through the AlivePDF API documentation to be able to do it as well. So perhaps, if you do it, you could post the steps so others can also benefit.

    I would say that for complex PDFs, Id use a server-side script every time. AlivePDF is fine for simple tables, but complex ones I think will be tricky.

    Allan
  • TheDefiantTheDefiant Posts: 3Questions: 0Answers: 0
    Hi Allan,

    Thanks for your quick response... I'll go though the above links... and i found few interesting blogs to run AS3 using java script.. i'll post my findings soon..
  • Nana111Nana111 Posts: 4Questions: 0Answers: 0
    HI there
    It is so difficult for me to create ,print or process PDF files without a PDF processing tool.
    I have got a free trial .They said that it is able to load, save, view, convert, annotate, edit, manipulate, compress and watermark source document image file in a programming way. C#.NET PDF reading & processing toolkit, as a component of above mentioned .NET Imaging SDK, owns all basic PDF document reading, viewing, and processing functions. And in this article, we will offer you a detailed instruction on C# PDF page processing functionality. You can have a try.
    http://www.rasteredge.com/how-to/csharp-imaging/pdf-processing/
  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    @Nana111 - Thanks for your comment, but I don't believe it contributes to this discussion as we are discussing AS3 created PDFs. I consider your comment spam, but will give you the benefit of the doubt this time. Please don't post a link to that C# library again unless actually relevant, or I will delete the post.

    Allan
  • jgcaudetjgcaudet Posts: 82Questions: 7Answers: 0
    Hi TheDefiant
    I was reading this discussions
    http://datatables.net/forums/discussion/comment/46669
    http://datatables.net/forums/discussion/comment/54789

    I downloaded from Adobe the Flex SDK
    http://www.adobe.com/devnet/flex/flex-sdk-download.html
    I copied ZeroClipboard.as and ZeroClipboardPdf.as to C:\flex_sdk_4.6\bin directory and AlivePdf.swc to C:\flex_sdk_4.6\frameworks\libs directory.

    I do like in 54789 :
    mxmlc -static-link-runtime-shared-libraries=true -library-path=C:\flex_sdk_4.6\frameworks\libs ZeroClipboard.as
    and the output i get is: C:\flex_sdk_4.6\bin\ZeroClipboard.swf (2166 bytes)

    But when I try with ZeroClipboardPdf (here we can modify font size, ...) :
    mxmlc -static-link-runtime-shared-libraries=true -library-path=C:\flex_sdk_4.6\frameworks\libs ZeroClipboardPdf.as I get this error :
    A file found in a source-path 'ZeroClipboardPdf' must have the same name as the class definition inside the file 'ZeroClipboard'

    Can anybody who knows the steps explain us ?
    Can you, Allan, help us?
    I think many of us need help

    Thanks a lot, Allan
  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    Simply rename the file to be ZeroClipboard.as3 .

    Allan
  • jgcaudetjgcaudet Posts: 82Questions: 7Answers: 0
    Thanks, Allan
    I renamed ZeroClipboardPdf as ZeroClipboard, and did :
    mxmlc -static-link-runtime-shared-libraries=true -library-path=C:\flex_sdk_4.6\frameworks\libs ZeroClipboard.as
    It generated the file ZeroClipboard.swf, then I renamed it to copy_csv_xls_pdf.swf and overwrote the same file (I had it in /TableTools/media/swf) with the one I generated, and worked.

    Ok
  • TheDefiantTheDefiant Posts: 3Questions: 0Answers: 0
    Hi Jgcaudet,

    I'm still working on this, i've no knowledge of flex, will look into that now, thanks for the details.
  • facesadfacesad Posts: 2Questions: 0Answers: 0
    Adobe seems great. but i am using this simple pdf software to customize pdf document. you can view, process and save pdf as you desire.
    http://www.rasteredge.com/dotnet-imaging/addon-pdf-document-reader/
This discussion has been closed.