Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Navigation
Latest Addons
AD Gallery 26
SyntaxHighlighte... 45
Newsletters v4.03 103
Facebook Like Box 117
Newsletters v4.02 55
Metro 146
Facebook Connect 161
Shoutbox Panel 123
Redactor for PHP... 102
MI Floating Side... 105
Facebook Login/R... 146
Avatar Studio v2.03 175
Relationship Sta... 93
Sexual Orientati... 111
Fisherman 138
Popular Addons
iTheme2 5790
Arise 5780
User Control v1.23 4610
Event Calendar 4037
Photowidget panel 3880
Radio-Theme red2... 3345
Highslide Gallery 3306
CSS/JavaScript D... 3219
Facebook Connect... 2973
Dynamic Menu 2886
Slideshow Lightb... 2712
L-AMANT 2654
Enigma 2628
2Dark 2601
Black 2566
View Thread
Official Home of PHP-Fusion » General Addon and Modification Support » Ideas for Modifications and Requests
Who is here? 1 guest(s)
 Print Thread
Articles/News 2 PDF
smokeman
Hi folks.

I found an old mod that allows printing out articles & news as a .pdf-file.

Now I've come so far that it's "alive" again - lol, I just mean that it's working again - somehow at least..

It prints out the articles/news fine but I can't get it showing the news-cat-images nor images from the articles.

I think it's a great and usefull modification - but without printing images out it's nothing worth - IMO at least.

If someone want's to have a look at it I attach the files here.

Have a nice day all of you!

Merged on Apr 03 2012 at 22:38:04:
If I have a .gif in my news it won't show it:
www.phpfusion-tip...admore=100

The error says it can't find the file no_img.gif - but it is there..
www.phpfusion-tip...no_img.gif

Besides that I dont know why it should show that no_img cause it should show my image from the news instead.

I'll investigate further into this - any help is of course apreciated.
smokeman attached the following file:
news_articles_2_pdf.zip [204.77kB / 136 Downloads]

Edited by smokeman on 03-04-2012 22:38
 
http://www.phpfusion-tips.dk/
JoiNNN
includes/output_pdf/fpdf.php line #2209
replace function _parsegif {...}
with
function _parsegif($file)
{
//Extract info from a GIF file (via PNG conversion)
if(!function_exists('imagepng'))
$this->Error('GD extension is required for GIF support');
if(!function_exists('imagecreatefromgif'))
$this->Error('GD has no GIF read support');
$im=imagecreatefromgif($file);
if(!$im)
$this->Error('Missing or incorrect image file: '.$file);
imageinterlace($im,0);
$tmp=tempnam('.','gif');
if(!$tmp)
$this->Error('Unable to create a temporary file');
if(!imagepng($im,$tmp))
$this->Error('Error while saving to temporary file');
imagedestroy($im);
$info=$this->_parsepng($tmp);
unlink($tmp);
return $info;
}

Source: http://code.googl...il?id=2#c3, first result for "FPDF error: GIF parser: unable to open file" on Google

There are still several issues with this mod.
 
http://github.com/JoiNNN
smokeman
How embarrassing - I normally always use Google and search first, but I thought "FPDF" only was for this mod/used in this mod and did not expect it was mentioned anywhere else. (you can hear I do not know anything about it, lol).

Anyway your solution is working but it does not show all of the image:
http://www.phpfus...admore=113

What are the other issues with this mod ?

Thanks by the way for looking at it.
 
http://www.phpfusion-tips.dk/
supersonic
bump any news or updates im looking for a pdf panel say i have a some pdf files i want to display on site in a panel etc any good ??
 
val
supersonic wrote:

bump any news or updates im looking for a pdf panel say i have a some pdf files i want to display on site in a panel etc any good ??


in navigation you can add this code: ( custom pages )

Download source  Code
<?php
echo "<iframe src='http://my.domain.com/guides/morchok.pdf' TYPE='application/x-pdf' TITLE='Morchok Raid Guide' WIDTH='100%' HEIGHT='600'></iframe><p><ahref='http://my.domain.com/guides/morchok.pdf'><strong>open in fullscreen...</strong></a></p>";
?>




( /guides/ is a folder made only for the pdf files, call it what you want and change the link of course ) Remember to add a link to navigation too ( of course ).

For FAQ:
first add question, then add the code as answer.

Download source  Code
<iframe src='http://my.domain.com/guides/morchok.pdf' TYPE='application/x-pdf' TITLE='Morchok Raid Guide' WIDTH='100%' HEIGHT='600'></iframe><p><a href='http://my.domain.com/guides/morchok.pdf'><strong>open in fullscreen...</strong></a></p>





for News its the same code as for FAQ.

Merged on Oct 23 2012 at 11:14:45:
smokeman wrote:

How embarrassing - I normally always use Google and search first, but I thought "FPDF" only was for this mod/used in this mod and did not expect it was mentioned anywhere else. (you can hear I do not know anything about it, lol).

Anyway your solution is working but it does not show all of the image:
http://www.phpfus...admore=113

What are the other issues with this mod ?

Thanks by the way for looking at it.


Thanks Smokey ;)

and gj on this, this should actually be implemented in fusion as standard :D only problem with it now ( which is a minor 1 ) is when you download the pdf it says: Do you wanna save the changes of my_file.pdf before it will be send?
Edited by val on 23-10-2012 11:14
 
Jump to Forum:
Similar Threads
Thread Forum Replies Last Post
Change News Category and Contents Name... help Content Administration 1 19-05-2013 18:51
How to change displaying my home page from news.php to index.php? General Discussion 19 14-05-2013 09:24
Number of news on the main page 7.02.06 System Administration 3 28-04-2013 02:29
Cannot post news System Administration 4 14-04-2013 17:11
Single News Panel Panels and Infusions 2 14-04-2013 16:22
Official Home of PHP-Fusion uses cookies. Some may already have been set. Read more about our Cookies here.
Please click the button I Consent Cookies to hide this bar and accept our cookies. If you continue to use the site with no action taken, we'll assume that you consent our cookies anyway.
Cookiebar Panel byVenue