Export – PDF Type – Server Error

QuestionsExport – PDF Type – Server Error
Ty asked 9 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 9 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

16 + 13 =

Login with your Social Id:

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 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

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

Let us improve this post!

Tell us how we can improve this post?