$vdir->copyDirectory(resource_path('elearningmedia/dist/js'), 'js');
if ($type === 'pdf') {
$vdir->copyDirectory(resource_path('pdfjs-legacy-min'), 'pdfjs');
- $css = file_get_contents(resource_path('pdfjs/web/viewer.css'));
+ $css = file_get_contents(resource_path('pdfjs-legacy-min/web/viewer.css'));
$css .= 'body{--sidebar-width:400px;}';
- $css .= '.article #sidebarContainer, .article .toolbar {display:none !important;}';
- $css .= '.article .pdfViewer{padding:0 !important;}';
- $css .= '.article #viewerContainer{top:0 !important;overflow:visible !important;}';
- $css .= '.article{--page-border:0;--page-margin:0;--body-bg-color:transparent;}';
- $css .= '.openFile,.rotateCw,.rotateCcw,.rotateCcw + .horizontalToolbarSeparator{display:none !important;}';
- $css .= '.bookmark,.print,.download{display:none !important}';
+ $css .= '#openFile,#pageRotateCw,#pageRotateCcw,#pageRotateCcw + .horizontalToolbarSeparator{display:none !important;}';
+ $css .= '#viewBookmark,#print,#download{display:none !important}';
$css .= '#viewLayers,#viewAttachments{display:none !important}';
- $css .= '#documentProperties,#cursorSelectTool,#cursorHandTool,#cursorHandTool + .horizontalToolbarSeparator,.horizontalToolbarSeparator.spreadModeButtons{display:none !important}';
- $popup = '.annotationLayer .popupAnnotation .popupWrapper .popup';
- $css .= $popup . ' h1,' . $popup . ' span{display:none !important;}';
- $css .= $popup . ' p{border:0 !important;margin-top:0 !important;}';
+ $css .= '#documentProperties,#cursorSelectTool,#cursorHandTool,#cursorHandTool + .horizontalToolbarSeparator,.horizontalToolbarSeparator.spreadModeButtons,#cursorToolButtons+.horizontalToolbarSeparator{display:none !important}';
+// $popup = '.annotationLayer .popupAnnotation .popupWrapper .popup';
+// $css .= $popup . ' h1,' . $popup . ' span{display:none !important;}';
+// $css .= $popup . ' p{border:0 !important;margin-top:0 !important;}';
$vdir->file_put_contents('pdfjs/web/viewer.css', $css);
}
$vdir->copy($file, 'media.' . $ext);