How to generate a quote pdf programmatically

Hi,

I use SugarCRM 7.6 Pro and I want to generate a PDF file of a quote (or another module) with PHP code.

As you can see in the below picture, what I want is to replicate the functionality of Download PDF with selected Template. I need to generate the PDF file in php and then use it in my code to put it as attachment of a mail or for saving it on the server disk.

I try to call the same service of the click on the dowload button with CURL in PHP with a lot of different headers and options but the response of the service is a page in HTML o an error and I can't get the PDF file. 

How can I do it?

Thank you very much.

Stefano Mapelli

Parents Reply Children
  • Thanks Francesca Shiekh, I have already seen all these links my problem but:

    1- the first is the export from sugar interface of the pdf, ad in my image

    2-the second i s the export with Restful API of a report and not of the pdf file of the modules

    3-the third doesn't help me to retrieve the pdf file, is only a guide for change the method of sugarpdf for custom pdf

    What I want is all in your row: "If you want to use PDF Manager from outside SugarCRM you can probably do so via API (I have not tried this myself)"

    I need help for this call at the API, can someone helps me?

    Best regards

    Stefano