| Support Center

(Back to Website)

Support Center

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Fields in PDF Export

Tom Fitz Apr 02, 2013 02:16AM PKT

Hi,

I have a table with many fields in it. On the grid, I use the select command to show only a few fields. But when I export to PDF, it is throwing the following exception: "TCPDF ERROR: Some data has already been output, can't send PDF file". I'm guessing that the error is because the PDF export is trying to include all the fields from the table, instead of just the ones I'm displaying.

Can you please provide information on how to resolve this?

Thanks,
Tom

Up 1 rated Down
Abu Ghufran Apr 02, 2013 06:47AM PKT PHP Grid - Support Center Engineer
Hi,

This error usually come when some html or text is sent to output before the $grid->render() function call. Please recheck.

Thanks.
Up 2 rated Down
Tom Fitz Apr 07, 2013 09:21AM PKT
Abu,

I've doubled check and there is nothing being sent to output before the render.

This error appears to occur when I filter 823 rows down to 4 rows and use the following:
$grid["export"] = array("format"=>"pdf", "filename"=>"merchant-income-report", "sheetname"=>"test");
$grid["export"] = array("filename"=>"merchant-income-report", "heading"=>"Merchant Income Report", "orientation"=>"landscape", "paper"=>"a4");
$grid["export"]["range"] = "filtered";


Thanks,
Tom
Up -2 rated Down
Abu Ghufran Apr 08, 2013 08:13AM PKT PHP Grid - Support Center Engineer
Can you check the response of HTTP call using firefox->firebug->response.
If your code is online somewhere, let me know the link.

Regards,

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)

Contact Us

  • Post a Public Question
  • Email Us
  • Live Chat!
  • Ask the Community

    Instructions

    • Paste complete code that is involved in your question. You can use pastebin.com to share code link.

    Screenshots or Online link of webpage is helpful in resolution. You can also send email at address mentioned below.

    • To report an issue, Write steps to regenerate the case.

    • For email support or live chat, Use gridphp@gmail.com and add it in Google Chat.
https://d218iqt4mo6adh.cloudfront.net/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete