$pdf->addPDF('path/to/source/file.pdf', '1,2', 'vertical')
Showing following error:
Undefined index: w
I think it is a typo mistake in the PDFMerger.php on line 85:
$fpdi->AddPage($file->getOrientationCode(), array($size['w'], $size['h']));
If you change the $size['w'] => $size['width'] and $size['h'] => $size['height'] the problem will be fixed.