Export to PDF and Landscape page format ?

Talk about Printing & Exporting Settings

Moderators: ne_moj, zewa

kasumovic
Expert
Expert
Posts: 87
Joined: Sep 7th, '10, 22:38

Export to PDF and Landscape page format ?

Postby kasumovic » Jul 3rd, '16, 16:57

It is nice that i have function that i can export to PDF ,

BUT it is useless if i you have wide datagrid and you place it on your A4 page in portrait mode

any solution for this ?

administrator
Site Admin
Site Admin
Posts: 5939
Joined: Jan 7th, '09, 23:18
Contact:

Re: Export to PDF and Landscape page format ?

Postby administrator » Jul 4th, '16, 08:59

The best solution id to use latest https://tcpdf.org/ componenet.
It allows to create PDF document on fly from html test, including UTF-8

kasumovic
Expert
Expert
Posts: 87
Joined: Sep 7th, '10, 22:38

Re: Export to PDF and Landscape page format ?

Postby kasumovic » Jul 4th, '16, 10:57

is possible to get easy html with my colored rows ?

can you please give me hint where in the code i can catch the html code for further processing ?

ne_moj
Master
Master
Posts: 243
Joined: Jan 1st, '16, 14:11

Re: Export to PDF and Landscape page format ?

Postby ne_moj » Jul 5th, '16, 10:58

Hello

If I understand you correctly, you need to pay attention to the function Bind() it displays html.

replace:
$dgrid->Bind();
ob_end_flush();
on:
$dgrid->Bind();
$results = ob_get_contents();
ob_end_clean();

And your HTML code will be stored in the variable $results


Return to “Settings: Printing & Exporting”