First of all, thanks to all the hard working developers for creating such a robust and well-rounded project management system. I have only just discovered ERPAL for Service Providers and have already been able to fit it into our workflow without much trouble.

One feature that I was hoping would be available was to Export a Document as a PDF.

Workflow wise, my company creates a Document as a quote for a project. Ultimately we would create templates for different sorts of services and then clone those templates into Documents that we can then alter to fill in the specifics for that company.

However, when it comes to exporting the document the only option I see is OpenDocument format. I did a quick search and found this page: document_pdf_export.inc.

I was hoping that if I put that code in its proper place I would see an additional option to export a document as a pdf but unfortunately this was not the case.

Could someone please send me some details on how to implement this feature?

Thank you :-)

Comments

manuelBS’s picture

Thanks first of all for all kind words, I will give them to the whole team!
I see that you really understand the benefits of all the integrated tools for your project management processes.
We had a PDF export some time ago. But as there are lots of problems using it with your own CI styles we decided to switch to the open document format (you can customize the open document template by uploading an own template file at /admin/erpal/basic in the fieldset "document settings"). We use it in our workflow to create documents for quotes and specifications with estimation and export it in an open document format. With libre office we create a PDF then or send the open document to our clients. It gives us much more flexibility.
Nevertheless as you already discovered, a PDF export can be implemented. Therfore it is neccessary to implement it in a similar way than the open document exporter is done. So if anybody wants to contribute this feature I am here to review.

oliverandmichele’s picture

You're very welcome for the kind words. They are well deserved.

My company was using the Storm PMS (Drupal 6 version) for years and Kudos to those developers as well. Their knowledge base system was a favorite of mine and the ability to email invoices right from the Drupal interface was a time saver (although truth be told those emails often landed in clients spam or never got to them). However, ERPAL's workflow is far superior when it comes to implementing a full Project Management System.

But I digress. I will check into LibreOffice. I can see how that workflow can be advantageous. I wish that Microsoft Word would open OpenOffice files natively but as far as I know this is not the case. That is why I prefer PDFs. Most everyone can open them up with no trouble and my formatting stays consistent.

The way that I tried to implement the "document_pdf_export.inc" was to copy the code:

<?php
// /**
// * Plugin to export as pdf
// */
// $plugin = array(
// 'type' => 'Pdf',
// 'handler' => array(
// 'class' => 'document_pdf_export',
// ),
// );

class document_pdf_export extends document_export {
public function save($uri, $filename){
// save the document to the disk
}

public function stream($filename){
// stream the document to the user and die()
}
}

to a new file and save it so that I now had this: profiles/erpal/modules/erpal/erpal_core/erpal_document_export/plugins/document_pdf_export.inc

I flushed all caches and went back to export a test document but still only get the OpenDocument format.

Is there an extra step I need to take to implement?

manuelBS’s picture

The implementation is long time ago. I will take some time and dig into it in the next week.

I wish that Microsoft Word would open OpenOffice files natively but as far as I know this is not the case.

Oh yes you can open the documents with word as well. Microsoft becomes open more and more ;-)

Sending invoices by mail is also on our roadmap. If you find people that want to contribute or help to finance the development, just let me know.

manuelBS’s picture

Status: Active » Closed (won't fix)
manuelBS’s picture

If somebody wants to contribute this feature, please reopen.