ShaastraWebops / ERP14

The Enterprise Resource Planner for Shaastra 2014
0 stars 0 forks source link

PDF Portal #21

Open pandaops opened 11 years ago

pandaops commented 11 years ago

Include a functionality for every user to generate a PDF using ReportLabs at will. The PDF will contain structured content of everything that happened in the department till then. For cores it's EVERYTHING. For coords, you can skip cross-departmental logic. I'll leave the exact details upto you.

Again, was done last year. Read if it helps.

@viswajithiii collaborate.

suraj93 commented 11 years ago

@Swapnil. Should we consider implementing a robust PDF generation API, than can be called with content ? We will probably be using PDFs quite a lot, and everyone reusing ( read copy-paste ) code may not work out.

sriramvasudevan commented 11 years ago

@suraj93: Who wrote the PDF code last time? Ananth and you? The PDF app seemed pretty extensive. Is it very ERP exclusive, or can it be ported easily? An API would be cool, considering the fact that we're planning to generate custom schedules on the main site. It would be useful for post-Shaastra stats as well.

On Sat, Jun 22, 2013 at 7:09 PM, Surajkumar Harikumar < notifications@github.com> wrote:

@Swapnil https://github.com/Swapnil. Should we consider implementing a robust PDF generation API, than can be called with content ? We will probably be using PDFs quite a lot, and everyone reusing ( read copy-paste ) code may not work out.

— Reply to this email directly or view it on GitHubhttps://github.com/ShaastraWebops/ERP14/issues/21#issuecomment-19856947 .

Sriram V, Third Year Undergraduate, Department of Computer Science and Engineering, IIT Madras

suraj93 commented 11 years ago

That's exactly the point. Ananth wrote one, and I wrote another one, exclusively. When Varshaa needed a PDF output, neither mine nor Ananth's worked while porting. I tried his, and I think he tried mine. Both threw loads of errors. Also, I wrote in a Document style PDF, as I had more text, and he did in Canvas style, as he had tables.

And by nature it wasn't ERP exclusive, as it came only from the models, and all the page coordinate calculations were generic, but the lack of portability was a major issue, even with Ananth's documentation skills.

An API may be a little difficult in the short run, but in the long run it will save on a lot. Most ( non-WebOps ) Coords and Cores will jump in joy with printable-PDFs. We can basically use it for anything. Maybe 2 APIs, one for tables, and one for text-based.

AbdealiLoKo commented 11 years ago

Listen. the datatable we have right now has a "download as pdf" option. I tried making it work, but failed. No idea why it didnt work. It also has excel and all, so it is much better.

eg : http://datatables.net/release-datatables/extras/TableTools/pdf_message.html

If this is good enough, there is no need to use reportlabs. Remember : this is a javascript implementation. Not python.

I think this is a better option for the "Table api" mentioned above.

I'm not sure how customizable it is ...