Members: 16,996
Threads: 38,846
Posts: 159,391
Online: 24

Newest Member: Kl_broka@rediffmail.com


Odoo.tv - Outdoor Television


Sedo - Domains kaufen und verkaufen das Projekt mambers.com steht zum Verkauf Besucherstatistiken von mambers.com etracker® Web-Controlling statt Logfile-Analyse

Go Back   Mambers.com > Archive > Mambo 4.5 > Mambo 4.5 General Talk

 
 
LinkBack Thread Tools Display Modes
Old 14.05.2004, 16:47   #1 (permalink)
Baby Mamber
 
Join Date: May 2004
Posts: 2
renemt is on a distinguished road
Question PDF creator for MAMBO which considers images?

Hi there!

Before I do duplicate work, I better ask...

Is there a PDF creator for MAMBO, which considers images when creating a PDF file from a content item?

When I took a look on the pdf.php (in '/includes') and the pdf/Cezpdf-class (in '/classes') I found the Cezpdf-class basically supports image generation in PDF files. As I see the situation, a customization of MAMBO's pdf.php is needed: when there is an <IMG> tag found in the content text string the function 'ezImage' of class Cezpdf has to be called for inserting the image. In this way even other tags like <STRONG> could be properly interpreted...

But the basic question is:
Is there allready an apropriate PDF creator?

Greets,
ReneMT
renemt is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Old 14.05.2004, 17:01   #2 (permalink)
Senior Mamber
 
Join Date: Apr 2004
Posts: 209
Sabra is on a distinguished road
Default Re: PDF creator for MAMBO which considers images?

"This Add-On makes it possible to have a PDF version of an article with images and tables:"

http://www.mamboportal.com/index.php...&filecatid=516

:-)


PS: here is the ReadMe file...

<<
PDF with images and tables support

This Add-On turns possible to have a PDF version of an article with images and tables. For this to work I've used other PDF class from FPDF (the same I use in my Support Center Component).

Unfornately not all image formats are supported and some HTML codes aren't used like colors but I consider this as a first step to get it better. I'm working with two more guys on a new HTML class for FPDF.

To install it just uncompress this file and copy/ftp the two folders to your mambo folder. Backup the pdf.php file you already have first.

I haven't done to many tests so if you have problems let me know and I'll try to add a fix to it.
>>
Sabra is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 14.05.2004, 18:10   #3 (permalink)
Baby Mamber
 
Join Date: May 2004
Posts: 2
renemt is on a distinguished road
Angry Re: PDF creator for MAMBO which considers images?

Well, as expected I get an error when running this script...

Some french part about an unexpected FPDF error and then the meaningfull hint "Some data already have been sent to the browser. Can not send PDF file." (or something like this). I gues it's a problem with PHPs output buffering, isn't it?
So I tried to encapsulate the pdf.php in ob_start() and ob_end_flush() but I did not bring the expected effect... The PDF which was sent (if actually any was sent) was corrupted, so Acrobat could not open it.

Any helpfull hints?

Greets,
ReneMT
__________________
renemt.de - Another great site based on MAMBO.
renemt is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 15.05.2004, 02:02   #4 (permalink)
Senior Mamber
 
Join Date: Apr 2004
Posts: 209
Sabra is on a distinguished road
Default Re: PDF creator for MAMBO which considers images?

Try this (without laughing at me :-)

open each .php file in a text editor, and simply erase all blank spaces AFTER THE LAST php statement (= ?>)

Sometimes it works...

Oh, and yes, I would be interested to know if it did work for you.
Sabra is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 15.05.2004, 08:05   #5 (permalink)
mmx
Expert Mamber
 
Join Date: Apr 2004
Location: Virginia Beach, Virginia USA
Posts: 309
mmx is on a distinguished road
Send a message via MSN to mmx
Default Re: PDF creator for MAMBO which considers images?

Mambo uses obstart, so you need to watch out for this if you try to invoke it separately. The place to do it is probably in index.php. For an example of how to do this, you might look at how Alex Kempkins handled this for his sub_template's hacks (posted as a snippet on mosForge).

The FPDF (Free PDF library) does not support image handling, but pdfLIB does. For non-commercial use, the use of pdfLIB is free but it is subject to licensing fees if used commercially.

Emir Sakic (one of the core developers) has a commercial solution for PDF that supports more PDF functions. I have never tried it and have heard no comments from anyone who has.

Interakt released their YAPS PDF library as GNU/GPL under their copyright and it has been implemented on other CMS systems such as Magellan and TYPO3. It does handle png and jpeg images (not gif because of compression licensing restrictions). I believe that it is dependent on Ghostscript for image rendering, but I have heard that it is a good solution.

There are a number of other PDF libraries for PDF out there. I have never tried them.

Quote:
Originally Posted by renemt
Well, as expected I get an error when running this script...

Some french part about an unexpected FPDF error and then the meaningfull hint "Some data already have been sent to the browser. Can not send PDF file." (or something like this). I gues it's a problem with PHPs output buffering, isn't it?
So I tried to encapsulate the pdf.php in ob_start() and ob_end_flush() but I did not bring the expected effect... The PDF which was sent (if actually any was sent) was corrupted, so Acrobat could not open it.

Any helpfull hints?

Greets,
ReneMT
mmx is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 18.05.2004, 17:38   #6 (permalink)
Junior Mamber
 
Join Date: Apr 2004
Posts: 45
webamoeba is on a distinguished road
Default Re: PDF creator for MAMBO which considers images?

Do you get somthing like this:

/mambo107/images/stories/nw_Workstation.gif gif : Format d'image non

well I do, I'm assuming this is all to do with "(not gif because of compression licensing restrictions)". hence the

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/mambo107/classes/html2pdf.class.php:406) in /var/www/html/mambo107/includes/fpdf.php on line 998
FPDF error: Some data has already been output to browser, can't send PDF file

is actually irrelevant, that's just to do with the fact that the error messages above have been sent, so no more header info can be sent.
webamoeba is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mamb-Ads Component -> images are not being displayed oukenfold Component 'How Do I' Questions 6 19.05.2004 23:47
replacing text with Images for Main Menu links noite Mambo 4.5 'How Do I' Questions 5 12.05.2004 22:33
how do I automatically save images (refer by links) on my webspace ? kixvn Mambo 4.5 'How Do I' Questions 1 05.05.2004 06:31
Rollovermenu with images mcpat Template Discussions 0 24.04.2004 03:52
Adding FTP'd images directly to content ThereseWeel Mambo 4.5 Bugs 0 15.04.2004 21:06


All times are GMT +2. The time now is 05:20.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
A vBSkinworks Design
© Copyright 2004-2008 by Arthur Konze Webdesign.