[NEW PLUGIN] Pdf Viewer

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

Moderator: Tata

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 4:15 pm

This modo returned:
PDF.js v1.4.20 (build: b15f335)
Message: Missing PDF "http://zusnobela.sk/plugins/pdfviewer/l ... myfile.pdf>".
The path .../lins/web/userfiles... seems to be wrong to me.
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 4:50 pm

Tata wrote:This modo returned:
PDF.js v1.4.20 (build: b15f335)
Message: Missing PDF "http://zusnobela.sk/plugins/pdfviewer/l ... myfile.pdf>".
The path .../lins/web/userfiles... seems to be wrong to me.
Oops. That should have been:

Code: Select all

    $o.='<iframe id="'.$id.'" src ="'.$pth['folder']['plugins'].'pdfviewer/libs/web/viewer.html?file='.$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>'; 
or:

Code: Select all

    $o.='<iframe id="'.$id.'" src ="'.$pth['folder']['plugins'].'pdfviewer/libs/web/viewer.html?file='.CMSIMPLE_URL.'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 7:43 pm

Can you see the plugin working on iPADs, tablets or iPhones? It worked before, now I see it's not. :-(
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.

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 8:56 pm

Tata wrote:Can you see the plugin working on iPADs, tablets or iPhones? It worked before, now I see it's not.
Android Tablet 1024x768
It works fine.
Looks good.

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 9:04 pm

frase wrote:
Tata wrote:Can you see the plugin working on iPADs, tablets or iPhones? It worked before, now I see it's not.
Android Tablet 1024x768
It works fine.
Looks good.
Same here, with either variant of my latest post.
Christoph M. Becker – Plugins for CMSimple_XH

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:09 pm

The last Link "UO Audio-vizuálny" doesn't work.

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 9:17 pm

Hm, it works with me only on computer. On iPAD and iPhone it doesn't work.
I actually have the same page installed on my host in subdomain http://nobela.cmsimple.sk and at original host http://zusnobela.sk.
The UO files on first URL return file origin does not match viewer's.
On the other URL files retun Missing PDF...
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.

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:19 pm

Look at the Christophs posts.
The url is not correct.
<iframe id="pdf_container" src="./plugins/pdfviewer/libs/web/viewer.html?file=/./userfiles/downloads

Is Firefox tolerant ???
But Chrome on Android - it works!

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 9:41 pm

Both iPAD and iPhone run the newest iOS and I have FF and Safary installed. Using both of Christoph's codes make no changes there. On iMAC run both codes well. Now I installed Chrom and it doesn't work with it. The messages are the same like on FF or Safari.
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.

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:42 pm

Und noch etwas:

Du hast in "plugins/pdfviewer/css/stylesheet.css" stehen:

Code: Select all

*[id^='pdf_container'],#pdf_container_1,#pdf_container_2,#pdf_container_3,#pdf_container_4,#pdf_container_5,#pdf_container_6,#pdf_container_7,#pdf_container_1#pdf_container_9,#pdf_container_10{
  width:100% !important;
  height: 782px !important;
}
Es genügt:

Code: Select all

*[id^='pdf_container'] {
  width:100% !important;
  height: 782px !important;
}

Post Reply