[NEW PLUGIN] Pdf Viewer
Moderator: Tata
-
- Posts: 155
- Joined: Thu Oct 06, 2011 7:00 am
[NEW PLUGIN] Pdf Viewer
Pdf Viewer is an implementation of the javascript based pdf.js project for CMSimple and can show an unlimited number of viewers on the same page. Pdf Viewer has options to bypass browser cache and to periodicaly refresh pages running this plugin.
Download: http://simplesolutions.dk/?PDF_Viewer
Download: http://simplesolutions.dk/?PDF_Viewer
Re: [NEW PLUGIN] Pdf Viewer
Cool! I wasn't even aware of pdf.js – pretty nice!
Minor issue: the disclaimer says:
Minor issue: the disclaimer says:
That should probably be:We will not assume any liability in case of data losses caused by News Rotator usage.
We will not assume any liability in case of data losses caused by PDF Viewer usage.
Christoph M. Becker – Plugins for CMSimple_XH
Re: [NEW PLUGIN] Pdf Viewer
Hi, how is it? Does it work with you? Oldnema wrote me that it doesn't work on his testpage. I made the installation and tried it, following instructions and thing is:
1. files are saved in /userfiles/downloads
2. the command placed on the page.
3. The viewer window is shown nice, but no file is loaded.
4. The "tmp" directory under /userfiles/downloads is created and copies with numeric names are created as well.
5. The viewer returns "Missing file", however.
6. Opening "More information" it says: PDF.js v1.4.20 (build: b15f335)
Message: Missing PDF "http://localhost:8888/userfiles/downloads/BANNERY.pdf".
I'll try it online and report soon back.
EDIT:
Online it works fine. What to do, to have it working on localhost?
Another question: how about include the preview in wdir_XH or download_control or any of download plugins? Maybe only some call of this plugin? Or a link with hi_fancybox or redirect the viewer into a lightbox?
I tried it with a link to the document. But this offers either the download or opening in any preferred application. How could be the plugin function be included into the link?
Something like
1. files are saved in /userfiles/downloads
2. the command placed on the page.
3. The viewer window is shown nice, but no file is loaded.
4. The "tmp" directory under /userfiles/downloads is created and copies with numeric names are created as well.
5. The viewer returns "Missing file", however.
6. Opening "More information" it says: PDF.js v1.4.20 (build: b15f335)
Message: Missing PDF "http://localhost:8888/userfiles/downloads/BANNERY.pdf".
I'll try it online and report soon back.
EDIT:
Online it works fine. What to do, to have it working on localhost?
Another question: how about include the preview in wdir_XH or download_control or any of download plugins? Maybe only some call of this plugin? Or a link with hi_fancybox or redirect the viewer into a lightbox?
I tried it with a link to the document. But this offers either the download or opening in any preferred application. How could be the plugin function be included into the link?
Something like
Code: Select all
<a href="?&pdfpreview("filename.pdf")... class="zoom_i">whatever</a>
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
-
- Posts: 155
- Joined: Thu Oct 06, 2011 7:00 am
Re: [NEW PLUGIN] Pdf Viewer
Christoph
Thx, it's now corrected.
Tata
I didn't test it on localhost.
pdf.js is complex so I just tailored it to my needs right now.
ad 4. temp directory is only created when cache is on.
Thx, it's now corrected.
Tata
I didn't test it on localhost.
pdf.js is complex so I just tailored it to my needs right now.
ad 4. temp directory is only created when cache is on.
Re: [NEW PLUGIN] Pdf Viewer
The directory is created. Thats not a problem. The problem is that one of the files is reported as not found. See here http://nobela.cmsimple.sk/?Documents/Po ... ovan%C3%A9simpleSolutions.dk wrote:ad 4. temp directory is only created when cache is on.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
Re: [NEW PLUGIN] Pdf Viewer
I'm having the same issue with a local installation which is in a subfolder of the docroot, i.e. I have to access it by http://localhost/xh167. In this case the PDF can't be found. The following change to plugins/pdfviewer/index.php line 67 solved the issue for me:Tata wrote:Opening "More information" it says: PDF.js v1.4.20 (build: b15f335)
Message: Missing PDF "http://localhost:8888/userfiles/downloads/BANNERY.pdf".
Code: Select all
$o.='<iframe id="'.$id.'" src ="'.$pth['folder']['plugins'].'pdfviewer/libs/web/viewer.html?file='.$GLOBALS['sn'].'/userfiles/downloads/'.($srctmp).'#zoom='.$plugin_cf['pdfviewer']['zoom'].'&pagemode='.$plugin_cf['pdfviewer']['pagemode'].'&page='.$plugin_cf['pdfviewer']['page'].'" allowfullscreen webkitallowfullscreen></iframe>';
Christoph M. Becker – Plugins for CMSimple_XH
Re: [NEW PLUGIN] Pdf Viewer
It appears that http://nobela.cmsimple.sk/userfiles/dow ... D%201b.pdf does not exist (or is not accessible). Did you perhaps misspell the filename?Tata wrote:The directory is created. Thats not a problem. The problem is that one of the files is reported as not found. See here http://nobela.cmsimple.sk/?Documents/Po ... ovan%C3%A9simpleSolutions.dk wrote:ad 4. temp directory is only created when cache is on.
Christoph M. Becker – Plugins for CMSimple_XH
Re: [NEW PLUGIN] Pdf Viewer
It is coppied from the browser. Anyway, you can find it under Docúents on the second subpage.cmba wrote:whttp://nobela.cmsimple.sk/userfiles/dow ... D%201b.pdf does not exist (or is not accessible). Did you perhaps misspell the filename?
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.
Re: [NEW PLUGIN] Pdf Viewer
Hm, but http://nobela.cmsimple.sk/userfiles/dow ... D%201b.pdf says 404 Not found.Tata wrote:It is coppied from the browser.
Christoph M. Becker – Plugins for CMSimple_XH