[NEW PLUGIN] Pdf Viewer

Third Party Plugins to CMSimple - how to install, use and create plugins

Moderator: Tata

frase
Posts: 5085
Joined: Thu Apr 21, 2016 6:32 am
Location: Saxony
Contact:

Re: [NEW PLUGIN] Pdf Viewer

Post by frase » Sat Dec 10, 2016 9:48 pm

Tata wrote:Using both of Christoph's codes make no changes there.
Nochmal genau nachsehen!
Oder Christoph fragen.

frase
Posts: 5085
Joined: Thu Apr 21, 2016 6:32 am
Location: Saxony
Contact:

Re: [NEW PLUGIN] Pdf Viewer

Post by frase » Sat Dec 10, 2016 9:59 pm

Noch etwas:

Ist das ein Tippfehler???
Nižšie sekudnárne umelecké vzdelávanie 2b
->
Nižšie sekundárne umelecké vzdelávanie 2b

Sorry, nur eine Frage.
Last edited by frase on Sat Dec 10, 2016 10:12 pm, edited 1 time in total.

Tata
Posts: 3587
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: [NEW PLUGIN] Pdf Viewer

Post by Tata » Sat Dec 10, 2016 10:08 pm

That's it - Special characters in file names. Removing accents and Slovak special markers made it. Now it works on all devices. That's no big problem. The files don't necessary need exact Slovak names.
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.

Tata
Posts: 3587
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: [NEW PLUGIN] Pdf Viewer

Post by Tata » Sat Dec 10, 2016 10:19 pm

frase wrote:Noch etwas:

Ist das ein Tippfehler???
Nižšie sekudnárne umelecké vzdelávanie 2b
->
Nižšie sekundárne umelecké vzdelávanie 2b

Sorry, nur eine Frage.
Ja das ist ein Tippfehler. Danke.
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.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: [NEW PLUGIN] Pdf Viewer

Post by cmb » Sat Dec 10, 2016 10:28 pm

Tata wrote:That's it - Special characters in file names. Removing accents and Slovak special markers made it. Now it works on all devices. That's no big problem. The files don't necessary need exact Slovak names.
You may try the following nonetheless:

Code: Select all

    $o.='<iframe id="'.$id.'" src ="'.$pth['folder']['plugins'].'pdfviewer/libs/web/viewer.html?file='.urlencode($GLOBALS['sn'].$GLOBALS['pth']['folder']['base'].'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

Tata
Posts: 3587
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: [NEW PLUGIN] Pdf Viewer

Post by Tata » Sat Dec 10, 2016 11:00 pm

PDF.js v1.4.20 (build: b15f335)
Message: Missing PDF "http://nobela.cmsimple.sk/userfiles/dow ... nie+2b.pdf".
I am googling now for a way of protectiom of viewed files against copying/downloading. Would be reasonable if there are files for download (not necessary viewed) and files for viewing (not necessary for copying and download).
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.

simpleSolutions.dk
Posts: 155
Joined: Thu Oct 06, 2011 7:00 am

Re: [NEW PLUGIN] Pdf Viewer

Post by simpleSolutions.dk » Sat Dec 10, 2016 11:16 pm

You have to change pdf.js file to remove download and other Icons. And you have to do it again every time you update the file.

Tata
Posts: 3587
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: [NEW PLUGIN] Pdf Viewer

Post by Tata » Sat Dec 10, 2016 11:27 pm

Uf! That's to complicated. On MAC, I eventually could use Atomator and create a routine doing the job whenever needed. But for less experienced enduser it's no solution. Right now I have tested a feature of OSX - printing into PDF with setting security obstacles. With viewer it works so, that copying/printing is impossible, but download goes without any warning.
No problem, it was only an idea. The files can be locked from editting by pasword easily.
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.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: [NEW PLUGIN] Pdf Viewer

Post by cmb » Sat Dec 10, 2016 11:47 pm

simpleSolutions.dk wrote:You have to change pdf.js file to remove download and other Icons. And you have to do it again every time you update the file.
And even then, anybody who's able to get the URL of the PDF is able to download it "manually".
Christoph M. Becker – Plugins for CMSimple_XH

Tata
Posts: 3587
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: [NEW PLUGIN] Pdf Viewer

Post by Tata » Sun Dec 11, 2016 6:41 am

cmb wrote:And even then, anybody who's able to get the URL of the PDF is able to download it "manually".
By full names of the documents it's not very likely to write the path correctly. There would be however also a chance to use randomly generated filenames, which would be not very reasonable for the admin OTH.
If the files would be protected by password, again, it would be difficult to break the password and edit the files. Also copy-protection from such files works pretty fine. The other thing the is, that the files can be also easily watermarked.
But these conspiracy shadiness is needless.

OTH the principles used in Downloadcontrol could be somehow applied (using some eventlistener) for any unathorized copying/downloading from a website, incl. texts, images etc. Maybe some next plugin?
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.

Post Reply