![]() |
Download Thread as PDF
Keywords: SHOWTHREAD, PDF, Abobe, export, download, thread
Description: Allows you to download an entire thread in PDF format, viewable in any PDF viewer such as Adobe Acrobat or Foxit Reader. Details: Previously, there was a modification that performed this task however that modification is no longer supported and the backend used was seriously out-of-date and suffered from quite a few bugs. I've gone ahead and created this modification around an entirely different backend, one which works quickly and flawlessly. Requirements: Notes: Please note, these prerequesits may already be installed on your system. If you're unsure, simply install the modification and upon usage it will inform you if something is missing. If you happen to be fortunate enough to be using Debian, the above requirements can be installed with the following packages: Code:
# apt-get install html2ps Code:
# apt-get install gs-common [hr]-[/hr] Usage: Under "Thread Tools", simply select "Download as PDF" which will be located under "Show Printable Version". Easy, eh? [hr]-[/hr] Installation:
Notes: All template modifications are made automatically. They attach to pretty common text locations, so modified styles shouldn't* be a problem. [hr]-[/hr] Comments: As with all my hacks, this modification is provided free of charge. However, if you find this product useful and have money burning a hole in your pocket, feel free to make a small donation, I won't mind.. really. :) Version History:
Currently Known Bugs:
* Please note that this modification was developed on a forum with a userbase of 1 (myself). I've tested it for basic functionality but I cannot guarantee functionality or behavior on your forum. So, please -- make backups before installing this product! |
Reserved.
|
What do I do with these?
* html2ps (link) * ps2pdf (link) I'm not sure where to put them and I couldn't quite understand the installation instruction. |
Quote:
Chances are, if you're using a shared hosting account, these are already installed. Before trying to install them, I would just attempt to run the modification first and see if they're already present. |
I have printthread completely removed for SEO purposes. This is just the alternative I've been waiting for! Thanks. :)
|
all the time :- safe mode effect .
Quote:
|
This really looks like a good feature for any forums. Thanks for releasing, will test it out shortly.
Thanks. |
Quote:
|
installed this and html2ps but still have the error
HTML_ToPDF Error: html2ps [/usr/bin/local/html2ps] not executable I changed the path in /includes/class_threadtop.php to /usr/bin/local/html2ps to no avail This mod requires the use a direct access to their server. What about those on shared hosting ? |
A few friends of mine run vBulletin sites on shared hosting and they were able to use this modification no problem. Really, it's hit or miss with some shared hosting providers.
The html2ps error you're receiving is claiming the binary isn't set to executable. What are the permissions? Did you install from source or did you use a package (ie. rpm, deb)? A simple chmod 755 should fix it (provided you have rights to do that). |
i'm on a VPS so i have full control over my server. Here is the step i used
wget http://user.it.uu.se/~jan/html2ps-1.0b5.tar.gz tar xvfz html2ps-1.0b5.tar.gz cd html2ps-1.0b5 ./install Click yes and set directory..it get installed in /usr/local/bin/ cd /usr/local/bin/ chmod 755 html2p* Still the same error...did i chmod correctly ? What do i miss ? |
anyone have the link to the older version of this hack?
|
Quote:
this link is marked with HTML Code:
rel="nofollow" |
Is there a screenshot of this?
|
Quote:
|
hm
i havnt heard that before, but ok have to belive you, because i'm not very interessted in this subject/topic(don't know how to say for that) in my eyes i make a site for the people and not for the bots.... but back to topic and isn't it right that google can look pdf files to? so wount it be double content? |
HTML_ToPDF Error: html2ps [/usr/bin/html2ps] not executable ???????????????????????
|
As my firend says, not all engines use the attribute. Also, while Google not double listing content in this way, other engines may do so - and Google will not take kindly to you have duplicate content indexed elsewhere (at least, this is what I believe). I also have no desire to allow a printable thread, if they wish to print the thread so much they can print the normal page (or now, use this).
Also, I intend to allow only members access to this - so no duplicate content issues there. |
Awesome! :D
[high]* projectego clicks install[/high] |
Quote:
|
Quote:
Quote:
Quote:
Quote:
Quote:
|
I now have this working but several problems needed to be overcome;
The required ghostscript and html2ps were not installed on my server so I had to get them and install them (without 'jasper', whatever that is). Once installed I got the execution errors and noticed that default path in the class file was wrong - they installed to /usr/local/bin/ (not /usr/bin/) so I had to edit the class file. Despite fixing this I still got the "not executable" errors, this was quickly traced to php open_basdir kicking in and preventing apache from accessing the binaries - so I had to update php settings. Once all this was done, the pdf conversion started to work - however, I was only getting one page, not the whole thread. This took a bit of degugging, during which I found some unnecessary code in the threadtopdf.php file. Having removed the unnecessary perpage stuff from the file, I found that even though the code was building the whole thread, once I used it properly, the pdf file was still only one page, with the perpage stuff I had removed. After much head scratching about how this was impossible I did some packet tracing to see what was going on and found the culprit - VBSEO. I had Rewrite Printthread URLs set to 'Yes' and this was somehow interferring with the way the this mod works, causing the pdf output to be built from printthread.php, and not threadtopdf.php - once I disabled the url rewrite on print threads, the mod started outputting the pdf correctly. I still have one minor issue - the header image is missing from the threads, but this is not important. FYI; I removed the following code in threadtopdf.php as perpage stuff is not needed ; PHP Code:
PHP Code:
PHP Code:
There is also a premissions problem - you cannot pdf threads unless they are viewable by guests, and also a slight error in the url build as well. I think I have fixed these problems locally, but need to test them, and I have to go out now for a few hours. |
Quote:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
If I decide to make this live I will probably do custom templates instead of using the printthread templates. :cool: |
Some of the threads on my site are between 50 to 300 pages long, and are basically stories you read from beginning till end. Mostly all of them have audio and photos as well.
It's nice to have the members logged in and reading the stories, instead of downloading the PDF file then getting logging out. While reading the threads, it also entices members to post in the thread. While logged out reading PDF files this may not happen. |
I get this error when trying am I missing something?
http://www.isosdcftp.com/forums/thre...hp?t=370&pdf=1 If I'm missing those files you posted a link to where do I install those? |
pdf convertion is fine, but i have no pics ...
neither avatars nor images/smilies :( |
Quote:
|
i overwrited my "old" version (2 days old) with the new one.
it works fine with the old one, but now i get this error message with the new one "HTML_ToPDF Error: html2ps [/usr/bin/html2ps] not executable" i have no root access and i dont know what to do :( |
can u upload the old version again plz?
the old works ..... |
Quote:
And yet, on the other hand, there are forums with lots of technical information and support shared. Admins might wish to allow their users to be able to locally archive and search this information. Users might feel "safer" knowing they're able to save a long, informative thread to their own computers... should the forum be down or the thread get removed. Think of vb.org, for example. There have been instances where a hack author leaves, or a mod is removed... in that case, the support thread with all he answers go "poof!" as well. As a forum admin who might be running one of those mods, the ability to save the thread for my own reference later on would be VERY much appreciated. That said... I, for one, am appreciative that magnus has coded this and is sharing it with us all. Looking forward to seeing improvements, if they are planned. I would like to see the option for images (inline as well as smilies) to be included, if that's possible. |
Yea, I'm trying to rework this modification to make it a bit easier for those on shared hosts who don't necessarily have access to server configs.
This was just a quick attempt to fill a requested need. We'll see what develops. |
thx :)
|
Which to real need of having a topic in pdf?
|
Quote:
Or, perhaps, you run a gaming site. Often threads will contain game hints, tips, walkthroughs or the like. Again, you can just save the thread to PDF and have it available at your fingertips. The list goes on and on. However, if you cannot fathom a use for your site then perhaps this modification isn't for you. |
any development on this, magnus ?
|
On this one, no. I'm trying to achieve the same results w/o the need for any non-standard unix binaries. There are a few ways to do it, but unforunately, they're not nearly as efficient. But, I do have a couple things in the works -- hopefully a viable solution will fall into place soon.
|
I have installed this on a new forum (not visible to the public yet) and it gives me a blank pdf. It clearly is a pdf though, but it is empty, just no content at all. I have vBSEO installed, could that interfere in some way?
|
Quote:
|
I tried that, doesn't work though. It still shows a completely empty PDF.
Looking a bit deeper, does it have problems with basedir restrictions? Safe mode is off, but basedir is limited to the public html directory. |
Quote:
|
All times are GMT. The time now is 06:25 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|