The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Download Thread as PDF Details »» | |||||||||||||||||||||||||
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! Show Your Support
|
Comments |
#22
|
|||||
|
|||||
Quote:
Quote:
Quote:
Quote:
Quote:
|
#23
|
||||
|
||||
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. |
#24
|
||||
|
||||
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. |
#25
|
||||
|
||||
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. |
#26
|
||||
|
||||
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? |
#27
|
|||
|
|||
pdf convertion is fine, but i have no pics ...
neither avatars nor images/smilies |
#28
|
||||
|
||||
You're not supposed to. It's a PDF of the "View Printable Version" output.
|
#29
|
|||
|
|||
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 |
#30
|
|||
|
|||
can u upload the old version again plz?
the old works ..... |
#31
|
||||
|
||||
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. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|