jDownloadsownloads.com

Advertisement
Advertisement:

Author Topic: Preview of PDF files?  (Read 1122 times)

0 Members and 1 Guest are viewing this topic.

Offline Jean-Pierre

  • Newbie
  • *
  • Posts: 8
Preview of PDF files?
« on: 27.10.2015 22:59:44 »
Hi, I just started to use jDownloads for managing free and paid downloads of PDF files. I'm very satisfied so far with the quality of the product, however there is one point where I have not found a way to do so far: for PDF files that are to be sold, I would like to offer a preview, i.e. a few pages of the full document so that users have a better idea of the PDF file before paying for it. I uploaded these preview PDF files through "Select Preview File" on the "Edit Download" page, but they do not show up anywhere. I would have expected to find a "Preview" link or button next to the "Download" button in the frontend, but  that's not the case. Any suggestion?

Offline ColinM

  • Moderator
  • *
  • Posts: 3.132
Re: Preview of PDF files?
« Reply #1 on: 28.10.2015 08:56:16 »
Hi
There is no automatic  way to preview several pages of a pdf as you indicate but there are various ways you can achieve your objective.  In all of them you either make images of the relevant pages or you create a short preview pdf file.

With the present jD 3.2 series the nearest to an automatic scheme then with the appropriate Configuration setup jD will create a preview image of the front page.  See the Thumbnails Settings section of the Configuration - Pictures Tab, in particular field 'Create Thumbnails from PDF files? However the image created is only the front page of the pdf.

You can have multiple images associated with each download so these could be images made by yourself.

Perhaps a better way is to create a pdf preview file - say using the Primo pdf 'printer' to get just the pages you want of each document that you wish to have a preview.  This could be a separate 'Download' or you could use the jD Content plugin within the Description part of the main download.  A variation on this would be to embed a "pdf viewer" plugin such as the free Techjoomla pdf viewer - see
 https://techjoomla.com/free-downloads/pdf-embed

To assist in embedding other plugins in  jD then the following article may help
http://www.jdownloads.net/documentations/item/extending-with-plugins-example-using-image-gallery-videos.

Colin
« Last Edit: 28.10.2015 08:57:22 by ColinM »

Offline Jean-Pierre

  • Newbie
  • *
  • Posts: 8
Re: Preview of PDF files?
« Reply #2 on: 28.10.2015 22:52:28 »
Thank you Colin,

I will see what approach fits best. I have already separate PDF preview files, however I would prefer not to embed them in the article, but to download them in a similar way than the main document.

Jean-Pierre

Offline ColinM

  • Moderator
  • *
  • Posts: 3.132
Re: Preview of PDF files?
« Reply #3 on: 29.10.2015 22:48:14 »
Hi
I was suggesting using the content plugin in the Description part of the Main download.  I have constructed, very quickly, an very basic illustrative example.The 'blue ringed ' part represents the link to the preview, which would have public download permission. I set it to have a pale blue background It uses appropriate layouts.  If you think scheme useful then I will post more details.

Colin

Offline Jean-Pierre

  • Newbie
  • *
  • Posts: 8
Re: Preview of PDF files?
« Reply #4 on: 29.10.2015 23:57:54 »
Hi Colin,

Thank you. Yes, I  believe your approach is a valid answer to my request. The PDF previews can be public, no problem.

Jean-Pierre

Offline EURRWebmaater

  • Newbie
  • *
  • Posts: 3
Re: Preview of PDF files?
« Reply #5 on: 18.11.2017 15:28:52 »
I want the user to be able to read the complete file also on the website.

I use the same plugin and try this code on my website
{pdf={url_download}|100%|600|pdfjs}  but the {url_download} is replaced with a download button instead only the url. I checked the parameter list but couldn' t find and raw url link or something is there an other way to get the raw url in the layout section?

Offline ColinM

  • Moderator
  • *
  • Posts: 3.132
Re: Preview of PDF files?
« Reply #6 on: 18.11.2017 17:10:43 »
Hi
In jD Config - Downloads tab - field "Which file types are to be opened in the Browser?" you can specify which files are opened in the browser.  This happens when clicking on the download button or the Download name.  But for this to work the file must be downloadable.
 If the whole file is viewable on the web then there is a lot of software which can 'steal' whatis being displayed!
Colin

Offline EURRWebmaater

  • Newbie
  • *
  • Posts: 3
Re: Preview of PDF files?
« Reply #7 on: 18.11.2017 17:33:21 »
I noticed now  it depends on the browser. my firefox just came with a download popup while IE opened a new tab with the pdf.
I would like it if the experience is the same AND that the user says on the website.

The scraping is not a problem, all the files are only available for members.
Is a additional tag possible or is there some PHP code that i can put in my layout that gives the url?
Edit: RAW elements would also be nice to embed a filtered fabrik list with relevant files.
« Last Edit: 19.11.2017 09:55:51 by EURRWebmaater »

Offline ColinM

  • Moderator
  • *
  • Posts: 3.132
Re: Preview of PDF files?
« Reply #8 on: 19.11.2017 20:58:40 »
Hi
You could try {pdf={file_title}|100%|600|pdfjs} but you would also need to set some config parameters.
See http://www.jdownloads.net/documentations/item/download-actions-direct-via-summary-page-or-via-download-details

Another approach is to use the jD Content Plugin with code based around something like below - also needs as above
Code: [Select]
<p>This article shows several&nbsp; jDownloads Content Plugin examples</p>
<div>{jd_file onlinelayout==Files link only v3.2}</div>
<div>This is some text with a download {jd_file file==25}in the middle of the line using layout "Files link only v3.2".</div>
<p>This is just text on a line as &lt;p&gt;</p>
for more on content plugin see
http://www.jdownloads.net/documentations/item/using-the-content-plugin-in-articles-and-modules

Please let us know how you get on
Colin

Offline EURRWebmaater

  • Newbie
  • *
  • Posts: 3
Re: Preview of PDF files?
« Reply #9 on: 02.12.2017 18:35:13 »
I`ve been looking and testing but always come to the point that i  need a full URL to the PDF file for the embedded PDF viewer. The  {file_id} would be the easiest way but is not available in the 'file detail' lay-out. Then i could simple use this:

{pdf="index.php?option=com_jdownloads&task=download.send&id={file_id}"|100%|600|pdfjs}
« Last Edit: 02.12.2017 20:14:33 by EURRWebmaater »

 

Advertisement