2

Given a php file, I export its output to an .odt file (OpenOffice Writer) by means of the following lines:

header('Content-Type: application/vnd.oasis.opendocument.text');
header('Content-Disposition: attachment; filename="myfile.odt"');

I can't figure out how to set the page orientation to landscape. By default, it is set to portrait.

Any hints?

Alex
  • 497
  • 5
  • 22

1 Answers1

0

I've found a solution using CSS:

@page {
  size: landscape;
}

It seems to be working, at least on Firefox. The answer was here: Landscape printing from HTML

Community
  • 1
  • 1
Alex
  • 497
  • 5
  • 22