PDF to display in Product info Page
Hi Everybody,
I am appealing to the very wise boys and girls here for advice,
My website products have many PDF spec's sheets. Currently they are attached using the plugin "PDF Attachment in Product Description " that displays the download link.
Problem that I have is I would like to make the PDF visible to the browser AS WELL AS the google " Bot ".
The converters ( PDF to HTLM ) all seem to do a poor job or they capture the PDF as a .jpg and wrap it in html, which has great browser appeal but no SEO value.
I have looked at "product_articles " by " gjh42 " but this seems to be geared to html.
I see that CKEditor has IFrame but I am not that ilterate . . .
I have tried stackoverflow's idea ( http://stackoverflow.com/questions/1...d-pdf-in-html5) doing this :
<div>
<object data="test.pdf" type="application/pdf" width="300" height="200">
alt : <a href="test.pdf">test.pdf</a>
</object>
</div>
But cannot get it to work
Has anybody got any ideas
thanks in advance
Andy
Re: PDF to display in Product info Page
ok, in ckeditor click source and then add this changing the src to the pdf name and location
<iframe id="iframepdf" src="files/example.pdf"></iframe>
Re: PDF to display in Product info Page
Quote:
Originally Posted by
bislewl
ok, in ckeditor click source and then add this changing the src to the pdf name and location
<iframe id="iframepdf" src="files/example.pdf"></iframe>
Thanks Bislewl, almost but not quite there.
Now I am getting a (firebug : 403 Network Error ) and on the browser screen it gives a Forbidden : You don't have permission to access /images/pdf/MS-KT-518.pdf on this server.
I have tried all variations of the string but get the same result
also
.htaccess rules
SecFilterInheritance Off
or
SecFilterScanPOST Off
just break the site
Andy
Re: PDF to display in Product info Page
Quote:
Originally Posted by
AndyJordaan
Thanks Bislewl, almost but not quite there.
Now I am getting a (firebug : 403 Network Error ) and on the browser screen it gives a Forbidden : You don't have permission to access /images/pdf/MS-KT-518.pdf on this server.
I have tried all variations of the string but get the same result
also
.htaccess rules
SecFilterInheritance Off
or
SecFilterScanPOST Off
just break the site
Andy
You need to add pdf to the allowed file formats in your .htacess file in the includes folder.
find a line that looks like the
Code:
<FilesMatch "(?i).*\.(js|css|html?|ico|jpe?g|gif|webp|png|swf|flv|xml|xsl|otf|ttf|woff|eot|svg|map)$">
and add 'pdf'
the actual line may be a little different depending on your ZC version
Re: PDF to display in Product info Page
You can also use the "Products Extra Files" plugin by delia. That's what I use on my needlework site (http://www.latitude9needlearts.com/i...&products_id=5).
Re: PDF to display in Product info Page
Quote:
Originally Posted by
lat9
Wow, I got the Some of the Big Guns . . .:D
Lat9 . Thanks for the input, I will definitely look at "Products Extra Files" for the download link if I have to go the jpeg route, however until I give up I am trying to get the pdf to show up in the products file.
Andy
Re: PDF to display in Product info Page
Design75 I tried changing the includes / htaccess file to include pdf as well as on the VPS "sites available " to include a FilesMatch rule Still no luck . . .
That said at least I saw an error log in apache2 error log talking about denying access - I could not see an error in the beginning, I think I must work on variations of the string some more.
Re: PDF to display in Product info Page
make sure your catalog/.htaccess also allows it and make sure it's PDF and pdf, you will need to make sure all the .htaccess files to the directory are allowing it. Also if you have an SEO URL module, make sure it doesn't try to re-write it.
Re: PDF to display in Product info Page
Quote:
Originally Posted by
AndyJordaan
Wow, I got the Some of the Big Guns . . .:D
Lat9 . Thanks for the input, I will definitely look at "Products Extra Files" for the download link if I have to go the jpeg route, however until I give up I am trying to get the pdf to show up in the products file.
Andy
The Products Extra Files plugin is what I use for the PDF file that's associated with the product I referenced in that link ...
1 Attachment(s)
Re: PDF to display in Product info Page
Some more information,
Done the pdf and PDF in both doc root htaccess as well as in the includes htaccess as well as in "sites available "
Ceon URL is at the moment Switched off
As a test I tested the Iframe with an html as well as png document
The png serves fine . . .
pdf and html do not serve . . .
I then dropped down from the VPS to my Localhost (Ubuntu 14 )
Same test, with the same result
I then killed the htaccess files in both home as well as includes folder I got . . .Same Result
Even killing the htaccess in the admin (getting a bit desperate here) I got . . . Same result
here is a screen shot
Attachment 14747