How can I control page orientation (Portrait/Landscape) in ‘toPDF’ function?
Will ‘toPDF’ function in php support the ability to wrap text which is larger than column size in both hdr and cells? If ‘yes’ where can I get info on how to do this?
Will the ‘online service’ support the above functions? If ‘yes’ where can I get info?
(2) The default implementation does not provide such kind of functionality. As far as I can see, it is possible to customize the code and implement such behavior, but it will be a rather complicated customization.
I was reading some of the other posts and it looked like the php version allowed for multi-line texts in the hdr and in the cells. However I couldn’t find anything in the documentation.
If I use the ‘on-line’ version then how do I configure for Portrait or Landscape please?
You can configure some fixed value of row height and header height, so multiple lines of text will be able to fit in one row of export file, but it is not an auto-size, just some fixed value for all rows and all header lines.
Is the ability to configure Page Orientation and Line height ONLY available if I use my own php server or is there a way of doing it for the ‘on-line’ service as well?
Sorry Stanislav, looking at the example in the above link it does appear that at least for data rows the row height is automatic. Please look at the last 2 rows of that example compared to the first 2.
For data rows, export service uses the default rowHeight value as minimum. During row rendering code checks for a text content of each cell and calculates the height based on the max height necessary to fit the content. It works for data part only and doesn’t work for headers.
Technically it can possible to use a similar approach for header cells, as core lib allows to calculae the height of content before rendering.
You can check getMaxRowHeight method in the gridPDFWrapper.php. Similar code can be created for header and called from headerDraw method.
Thanks for that Stanislav. Please can you tell me whether all this is only possible by running our own php server or will the ‘on-line’ service also handle this? I did try the on-line service but it didn’t automatically change row height. Perhaps I need to send it some extra parameters?