i need some help about papersize in PHPEXCEL
im using PHPExcel 1.8
and i wonder how to do this
if i redirect to printBigPaper.php , it will render excel file with 20inch x 25inch print area (Let's Name it : MY_CUSTOM_BIG_PAPER)
and
if i redirect to printSmallPaper.php , it will render excel file with 3inch vs 3inch print area (MY_CUSTOM_SMALL_PAPER)**.
That is all the list what i need to do.
If i manually use Excel, i can just simply Define new Paper Size once in a lifetime and then after i generate the excel file, i open it, and simply choose that paper size.
but i want do it automatically using PHPExcel.
What i've found out is :
I looked the code at "Classes/PHPExcel/Worksheet/PageSetup.php" and i found 66 DEFINED PAPER SIZE by PHPExcel
which i thing most of them has not defined yet in my Excel.
I tried to print using number 37 which is PAPERSIZE_MONARCH_ENVELOPE and it works eventhough i dont have that paper size in my Excel.
It makes me think, if PHPExcel can make 66 CONST PAPER SIZE and my excel understand that, i also can DEFINE new PAPER SIZE. So i make CONST MY_CUSTOM_BIG_PAPER as number 67.
then i tried to setPaperSize(PHPExcel_Worksheet_PageSetup::MY_CUSTOM_BIG_PAPER) and it does not give any errors.
but i dont know where to override the code so that PHPEXCEL can understand that if i choose MY_CUSTOM_BIG_PAPER , it will produce 20inch vs 25inch print area
thanks guys, i really hope you guys can help me with this problems.