Some data has already been output, can't send PDF file

Hello All,

When I am trying to download custom pdf from a custom module.The pdf download is blocking and showing this

[FATAL] TCPDF ERROR: Some data has already been output, can't send PDF file

error in Sugarcrm.log file

Anyone can help me to solve this issue.

  • Hi Sino Thomas

    Try to add ob_start() at the top of the page or ob_end_clean() before calling the output function.

  • Did you create a custom Sugarpdf for rendering that custom pdf?

    Eventually your code is echoing something which cause such error.

    Maybe a blank line before the tag <?php.

    Take a look at this article in order to understand how to debug the possible issue within.

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • Hello André Lopes,

    Yes,I am using sugarpdf->sugarpdf.pdfmanager.php   assign custom values to template.