pdf export in Portait orientation

IDE: Delphi XE5 update 2
OS: Windows 7
COMPONENT: TMS FlexCel Studio for VCL

QUESTION:

Hi

i have written a simple application that convert a xlsx files in pdf.
my routine is :

xlsxtemp.Open(pathpdf+"\templatescheda.xlsx");

pdf := TFlexCelPdfExport.Create(xlsxtemp, true); 

pdf.Export(pathpdf+"\"+pdffilename+".pdf");

 

my  routine work correctly.
i saw that orientation is landscape.

There is a property of pdf object where i change orientation in Portrait ?

 

Hi,

You can change the orientation in the xlsxtemp object:

xlsxtemp.Open(...);
xlsxtemp.PrintLandscape := false;
pdf := ...

Or you can change the orientation directly in Excel in templatecheda.xlsx file. 
PdfExport will always use the orientation that is saved in the file. Note that there might be the case that the xlsx file doesn't have any orientation saved, in this case the orientation is undefined, and you should use xlsxtemp.PrintLandscape := true always.