$pdfAction = 'D'; // download } // generate name with timestamp $mpdf->Output('DANIELFANICA_CV_' . date('YmdHis') . '.pdf', $pdfAction); print_r($mpdf); break; /** * EXPERIMENTAL FEATURE!!! */ /** * EXPERIMENTAL FEATURE!!! */ case '/cv/docx': if (ENVIRONMENT !== 'production') { VsWord::autoLoad(); $doc = new VsWord(); $parser = new HtmlParser($doc); $contents = file_get_contents("http://{$_SERVER['SERVER_NAME']}/cv"); $parser->parse($contents); // echo "<pre>{$doc->getDocument()->getBody()->look()}</pre>"; $timestamp = time(); $doc->saveAs("docx/danielfanica_cv_demo_{$timestamp}.docx"); } break; default: if (ENVIRONMENT !== 'development') { // how far behind to we want to look for data? (in days) $prev_no_days = 90; // https://gist.github.com/daitr-gu/472c4f18522172542cca // http://stackoverflow.com/questions/29742460/how-to-get-steps-count-with-google-fit-api-in-php