"View Online" -> Use pdf preview file if unsupported file format
Open Source Document Management System
Brought to you by:
steinm
When clicking "View Online" at some document formats - e.g. doc, docx, eml - they cannot be opened in the browser, and the browser initiates a download.
SeedDMS could instead look for an existing preview file in the cache and load this document or try to create this pdf preview file if it does not yet exist and if there is a converter suitable for this file type.
change following on line 90: by PEAR PdfPreviewer.php
if($target != '' && (!file_exists($target.'.pdf') || filectime($target.'.pdf') < filectime($infile))) {
to
if($target != '' && (!file_exists($target.'.pdf') || filectime($target.'.pdf') > filectime($infile))) {
and be shure that www-data, apache2 user have right to write homefolder ("/var/www") that can unoconv write pdf.
Last edit: dst 2017-06-02
This is not working, and i'm not shure why it should: if i'm right, the only thing different in the two lines is the < sign. Why should this open the pdf file?
I have the same problem not preview and not view online doc file, excel file.
The difference between ViewOnline and Download is simply, that Download will keep the browser from running an application which can display the file. In both cases the document remains unchanged. Changing this behaviour may confuse the user, because she/he may not be able to tell if the delivered file is the original file or a converted version of it.
Yes it is possible on code level changes you can use google doc viewer for .doc .exl .ppt
add this code in file
Enjoy!
File: class.viewDocument.php
if($fType == ".doc" || $fType == ".docx" || $fType == ".xls" || $fType == ".xlsx" || $fType == ".ppt" || $fType == ".pptx"){
echo "
// echo "Some Other ";
}
//echo $latestContent->getFileType();
Last edit: Muhammad Asim 2020-12-02