Export – PDF Type – Server Error

QuestionsExport – PDF Type – Server Error
Ty asked 3 years ago

Thank you so much for all the amazing support. Fantastic tool.

Premium Version: phpgrid-full-v1.5.2.zip

Goal: Export file type to be PDF. Currently it is XLS

Current Code:

$g->set_actions(array(
"add"=>false,
"edit"=>true,
"clone"=>false,
"bulkedit"=>false,
"delete"=>false,
"view"=>false,
"rowactions"=>true,
"export"=>true,
"autofilter" => true,
"search" => "simple",
"inlineadd" => true,
"showhidecolumns" => false
)
);

and

$e["on_render_pdf"] = array("set_pdf_format", null);

When I add:

$dg->enable_export('PDF');

Result:

Server Error. Page will not load at all.

1 Answers
Abu Ghufran answered 3 years ago

You need to set export format.

$opt["export"] = array("format"=>"pdf", "filename"=>"my-file", "heading"=>"Invoice Details", "orientation"=>"landscape", "paper"=>"a4");
$g->set_options($opt);

Refer demos/export/export-pdf.php

Your Answer

20 + 15 =

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating / 5. Vote count:

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!