Given a PDF, how can one get the layout mode of a PDF (or relative width/height) using a PHP lib or linux command line tool?
Using http://www.tecnick.com/public/code/cp_dpage.php?aiocp_dp=tcpdf which can set this variable on new PDFs, but for existing pdfs from adobe.
Thought of converting pdfs to ps, or using gs in some other way – like converting it to an image first, and getting the width and height of that. Is this the best way?
The solution I’m using is to use ghostscript to print the first page to an image, then getting the image dimensions