mariovaldez.net
http://www.mariovaldez.net/webapps/forums/

PDF Thumbnails? ... or links to download documents.
http://www.mariovaldez.net/webapps/forums/viewtopic.php?f=1&t=61
Page 1 of 1

Author:  JABevan [ 09 Oct 2003, 05:29 ]
Post subject:  PDF Thumbnails? ... or links to download documents.

I have created a directory and uploaded two documents in PDF format which are used on a regular basis. Is it possible to dynamically create a thumbnail and display a PDF in the CM??? If not, how do I create links on my document to download the files?

Thanks!

Author:  Mark Coudriet [ 09 Oct 2003, 06:39 ]
Post subject:  PDF

    Currently no thumbnails for PDF.

    Two ways:
    1) Using Wiki Markup
    Code:
    {{.docname.pdf MyText}}

    2) Hardcode - >
    Code:
    <A style=background-color:white HREF=getfile.php?cm_s=1&amp;cm_path=/dirname&cm_file=Myfile.pdf TITLE=MyFile>Download MyFile</a>

Author:  JABevan [ 09 Oct 2003, 08:21 ]
Post subject: 

Thanks again!!!

Author:  JABevan [ 14 Oct 2003, 07:48 ]
Post subject: 

Hmm? Not working for me. I've tried both the HTML and Wiki code in two different browsers. The Wiki opens a second browser window with the correct path, but nothing happens. The HTML code loads to a blank page (in Mozilla) and then comes back to the document I created in CM, or just quickly loads (in IE) .

This is the code I'm using:

<A style=background-color:white HREF=getfile.php?cm_s=1&amp;cm_path=/directory/subdirectory&amp;cm_file=filename.zip TITLE=file>Download file (BACK)</a>[/i]

Author:  JABevan [ 14 Oct 2003, 07:57 ]
Post subject: 

Looks like a right-click and save downloads the file ok. Anyway to get around this?

Thanks, I really appreciate the help.

Author:  Mark Coudriet [ 14 Oct 2003, 10:18 ]
Post subject:  No

Sorry, I don't think there is any way around it. If you find a way I would like to know too. Many users don't like the fact that they have to save the file first to their local drive.

Mark =]

Author:  mvaldez [ 17 Oct 2003, 06:11 ]
Post subject:  Linking PDFs files...

Hi JABevan and Mark.

If you only have PDFs files in the document directory, then the simpler way to link them is to use the #FILES# directive. This works if HTML is enabled or disabled. (Most of the Wiki-like markup only works if HTML is disabled).

If you want to link individual files, do as Mark said; using the Wiki markup or using HTML. (In the case of HTML, is better to use the WYSIWYG HTML editor because it will convert the URLs automatically from x.pdf to getfile.php?cm_path=... etc).

About opening the PDF inside of the Phprojekt frameset, well, the CMS module can suggest the browser to open it "inline". (By default, it ask the browser to openit with the application, not inside the browser).

To set this, open the cm_mimetypes.inc.php file, and go to the end of the file. There are five lines commented out (disabled), those for MS Office files and PDFs. Just enable the PDF line and now the CMS module will ask the browser to open the PDF inside the browser window. (If opens a new window or not, depends on what wiki markup you used, check the reference in the editing window).

Please note that the suggestion of the HTML code is just that, a suggestion; the browser will do whatever is configured to do.

Another source of problems is with PDFs + SSL + IE. But that a different problem.

Regards,

Mario A. Valdez-Ramirez.

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/