Not logged in. · Lost password · Register
Forum: Customising UNB Modifications and plug-ins Plug-in gallery RSS
PDF Plugin
Page:  1  2  3  next 
tkoneo #1
Member since Feb 2006 · 52 posts
Group memberships: Members
Show profile · Link to this post
Subject: PDF Plugin

Plug-in name:           PDF
Plug-in version:        1.2 (24.10.2006)
Plug-in description:    Adds pdf support to the board environment
Author:                 Florian Fiedler
                        flofi_is at web.de
Compatiblity:           unb.stable.1.6.x
Tested:                 unb.stable.1.6.1 / unb.stable.1.6.2 / unb.stable.1.6.3
Download:               pdf_plugin_20061024.zip



This plug-in gives you the possibility to create PDF files out of a thread. I like doing this, because the printing of pdf is much easier to handle as the printing of html.

I changed the creation of PDF files to use utf8_decode and AbbcProc (to plaintext) for to show special chars like ä ö ü right. But maybe some chars won't be displayd right because as I read in the source code reference the AbbcProc to plaintext could be broken. Yves will fix this if he is going to use this function.

Feel free to give comments and make modifications ...
 
Screenshots:
No Screenshots.

Installation instructions:

1. Unzip and copy files to your UNB folder as following:
  • pdf.en.php -> [UNB root]/unb_lib/plugins/
  • pdf.de.php -> [UNB root]/unb_lib/plugins/
  • pdf.lib.php -> [UNB root]/unb_lib/plugins/
  • pdf.php -> [UNB root]/unb_lib/plugins/
  • /pdffonts -> [UNB root]/unb_lib/plugins/
  • pdf_icon.png -> [UNB root]/unb_lib/designs/modern/img

2. Configure the plugin:
  • Login with administrator priviledges and go to Settings -> Plug-ins.
  • Click on Settings for the plug-in named pdf.
  • You could define here a Logo-Image which would be shown on top of the first pdf page.
  • ATTETNTION: No alpha images are allowed here.
  • You must define one of the given font types.

Features planned in next releases, the most important are first in list
  • Maybe some cosmetic changes
  • More sugestions?

Version history:
  • 1.0 (17.03.2006)
    • Intial Version
  • 1.1 (14.05.2006)
    • Now make use of utf8_decode & AbbcProc for to show special chars right.
    • If no font is selected Arial is used.
  • 1.2 (24.10.2006)
    • Fix broken PDF Link in Threads
    • Add utf8_decode for subject
    • A bit cosmetic
This post was edited 4 times, last on 2006-10-24, 14:13 by tkoneo.
ZORGLUB #2
Member since Mar 2006 · 5 posts
Group memberships: Members
Show profile · Link to this post
are accentuated font okay in the PDF creation?
and the ' sign?
Fhran #3
Member since Mar 2006 · 1 post
Group memberships: Members
Show profile · Link to this post
**************

I have installed this plugin. Works fine. Thanks!

Are you planning to support any bbcode tag? How dificult is to add this feature?

*************
tkoneo #4
Member since Feb 2006 · 52 posts
Group memberships: Members
Show profile · Link to this post
As I have read that Yves plans to implement a BBCodeToText Function, this should be no problem.
But at this time I have no chance to convert the BBCodes right. If I use BBCodeToHtml you would see the <html> tags in the pdf. This isn't very nice.
tkoneo #5
Member since Feb 2006 · 52 posts
Group memberships: Members
Show profile · Link to this post
In reply to post #2
Quote by ZORGLUB on 2006-03-27, 12:57:
are accentuated font okay in the PDF creation?
and the ' sign?

O sorry, I haven't tested this. I'm not shure about implementing new fonts to the pdf-class. It is possible, but I don't know exactly how. Maybe someone else has any idea?
Mardok #6
Member since Feb 2006 · 22 posts
Group memberships: Members
Show profile · Link to this post
In reply to post #1
Subject: my first test with this plugin
Hi,

I tested the pdf-plugin.
It seems that the pdf-plugin has a problem with special letter e.g. "ä" "ü" "ö" in headlines or subjects.
In the normal text it was already replaced in "ae" "oe" "oe".

Also it would be nice, if it is possible to translate the codes like [B][/B] also in bold.
It this is not possible it may be better to remove all these Codes.

Tanks for the plugin.
Mardok
tkoneo #7
Member since Feb 2006 · 52 posts
Group memberships: Members
Show profile · Link to this post
New Version 1.1 is out.

Quote by Mardok on 2006-04-10, 11:22:
It seems that the pdf-plugin has a problem with special letter e.g. "ä" "ü" "ö" in headlines or subjects.
In the normal text it was already replaced in "ae" "oe" "oe".

This is because I used the UnbToANSI function to convert the text from the database. Now I use utf8_decode with AbbcProc to plaintext. All chars like ä ü ö should now be shown normal. But I have seen that chars like "€" are not shown propperly. At the moment we have to life with this bug.

Quote by Mardok on 2006-04-10, 11:22:
Also it would be nice, if it is possible to translate the codes like [B][/B] also in bold.
It this is not possible it may be better to remove all these Codes.

The conversion from B to bold isn't as easy as it sounds. Because for that I have to parse every char of the message by my own. In the new Version the AbbcProc removes these chars. Some problems I have seen are with the [quote] & the [img] tag, but this is a problem of AbbcProc.
Gabel #8
Member since Apr 2006 · 16 posts
Group memberships: Members
Show profile · Link to this post
The plugin isn't working for me.

Everytime I want to export a Thread as PDF I got the error:

FPDF error: Some data has already been output to browser, can't send PDF file


The PDF-Plugin is already configured and I also used different fonts but it's not working :(.
tkoneo #9
Member since Feb 2006 · 52 posts
Group memberships: Members
Show profile · Link to this post
Sorry, but I can't reproduce the error. Maybe you could tell me how you configured the plugin.
Gabel #10
Member since Apr 2006 · 16 posts
Group memberships: Members
Show profile · Link to this post
I attached a picture of my PDF-Plugin-Config and my patched version of the file "common_out.lib.php".

I tried the plugin on different webservers (also on my local webserver) but it's still not working.
The author has attached one file to this post:
pdf_plugin_config.zip 34.7 kBytes
You have no permission to open this file.
tkoneo #11
Member since Feb 2006 · 52 posts
Group memberships: Members
Show profile · Link to this post
Sorry, but I can't find any mistake.

I used your common_out.lib.php and everything works fine. I added now a check, if no fonttype is selected "Arial" is used.

Maybe you have an PHP-Problem. What Version do you use?
Gabel #12
Member since Apr 2006 · 16 posts
Group memberships: Members
Show profile · Link to this post
Local Server: PHP Version 5.1.1
Other Server: PHP Version 4.4.2

It's not working on both PHP-Versions.
Avatar
Yves (Administrator) #13
User title: UNB developer & webmaster
Member since Jan 2004 · 3814 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Gabel, please check all of your PHP files for common mistakes.
  • No new lines before or after the PHP tags where there shouldn't be any
  • No UTF-8 BOMs in any translation or source code file
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Gabel #14
Member since Apr 2006 · 16 posts
Group memberships: Members
Show profile · Link to this post
I reinstalled my UNB-Forum and installed the PDF-Plugin (no other plugins except the included e.g. acl-viewer installed).

Now he opens the Adobe Reader when I click on the PDF-Symbol to generate a PDF-File and I get an error.

I uninstalled the Adobe Reader and now it's working but I can't open the PDF-File without a PDF-Reader ;)

In my other Forum where the PDF Plugin is not working I have also the Calender-Plugin installed. Could their be a conflict between this two plugins?

[addition]
I installed another PDF-Viewer and now it's working (but not in the Forum, where the calender ist installed)

The PDF-Files looks nice... Great Plugin :)
It's too bad that's not working in one of my forums :(
Avatar
Yves (Administrator) #15
User title: UNB developer & webmaster
Member since Jan 2004 · 3814 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by Gabel:
It's too bad that's not working in one of my forums :(

The next logical step is to compare both your UNB setups file-by-file and find the difference.
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Page:  1  2  3  next 
Go to forum
This board is powered by the Unclassified NewsBoard software, 20110527-dev, © 2003-2011 by Yves Goergen
Page created in 277.1 ms (165.1 ms) · 137 database queries in 189.8 ms
Current time: 2012-02-07, 20:18:58 (UTC +01:00)