How to read subscript/superscript using PHPExcel library?
if ($objPHPExcel->getActiveSheet()->getCell($cell)->getValue() instanceof PHPExcel_RichText)
                {
                    // $plaintext = $objPHPExcel->getActiveSheet()->getCell($cell)->getValue()->getPlainText();
                    
 $cellValueAsString = '';
$elements = $objPHPExcel->getActiveSheet()->getCell($cell)->getValue()->getRichTextElements();
foreach ($elements as $element) {
    // Rich text start?
    if ($element instanceof PHPExcel_RichText_Run) {
        if ($element->getFont()->getSuperScript()) {
            $cellValueAsString .= '<sup>';
        } else if ($element->getFont()->getSubScript()) {
            $cellValueAsString .= '<sub>';
        }
    }
    // Convert UTF8 data to PCDATA
    $cellText = $element->getText();
    $cellValueAsString .= htmlspecialchars($cellText);
    if ($element instanceof PHPExcel_RichText_Run) {
        if ($element->getFont()->getSuperScript()) {
            $cellValueAsString .= '</sup>';
        } else if ($element->getFont()->getSubScript()) {
            $cellValueAsString .= '</sub>';
        }
    }
}
echo $cellValueAsString;
Imagick create image from pdf file
$url ='file.pdf';
$path='img';
$file=$path.'/300.png';
$im = new imagick();
            $im->setResolution(300, 300);
            $im->readImage($url.'[0]');
            $im->setImageFormat('png');
            $im->setImageBackgroundColor('white');
            $im->setImageAlphaChannel(11);
            $im->mergeImageLayers(Imagick::LAYERMETHOD_FLATTEN);
            if (!file_exists($path)) {
                mkdir($path, 0777, true);
            }
            file_put_contents($file, $im);
            $im->clear();
            $im->destroy();