$pdfHandler->extractImage($_GET['image'], $_GET['x'], $_GET['y'], $_GET['width'], $_GET['height']); } elseif (!empty($_GET['renderpdf']) && !empty($_GET['page'])) { // Create page image. $pdfHandler->createPageImage($_GET['page']); } elseif (isset($_GET['renderthumbs']) && !empty($_GET['from'])) { // Create thumbs. $pdfHandler->createPageThumbs($_GET['from']); } elseif (isset($_GET['renderbookmarks'])) { // Extract bookmarks. echo $pdfHandler->extractBookmarks(); } elseif (isset($_GET['rendertext'])) { // Extract text into database. $pdfHandler->extractXMLText(); } elseif (isset($_GET['gettextlayer']) && !empty($_GET['from'])) { // Get text from the database. echo $pdfHandler->getTextLayer($_GET['from']); } elseif (isset($_GET['searchtextlayer'])) { if (empty($_GET['search_term'])) { sendError('No search term provided'); } // Search text in the database. echo $pdfHandler->searchTextLayer($_GET['search_term']); } elseif (isset($_GET['deleteannotation']) && !empty($_GET['type'])) { $dbids = array(); if (!empty($_GET['dbids'])) { $dbids = $_GET['dbids']; } // Delete annotation. echo $pdfHandler->deletePDFAnnotation($_GET['type'], $dbids); } elseif (isset($_GET['editannotation']) && !empty($_GET['dbid'])) { // Edit PDF note text.