Page 1 of 1
PDF Icon
Posted: Tue Sep 04, 2007 2:38 pm
by MCCIT
Hi all
Any way of changing the PDF icon properties so that rather than just displaying text from the page, it displays images too? Mine is not doing this and I have a specific request from a client that they would like this
Cheers all
Dave Colgate
Systems Engineer
MCCIT Support
Re: PDF Icon
Posted: Tue Sep 04, 2007 2:43 pm
by donmarvin
You need to get a commercial product for this, like Pretty PDF.
Re: PDF Icon
Posted: Tue Sep 04, 2007 3:23 pm
by MCCIT
Thanks very much - I shall investigate that one!
Dave
Re: PDF Icon
Posted: Tue Sep 04, 2007 3:24 pm
by MCCIT
While we are here, can you tell me where I can get this pretty pdf, as a quick google search has not shown up anything
Thanks for the help
Dave
Re: PDF Icon
Posted: Tue Sep 04, 2007 3:39 pm
by donmarvin
I had seen it in the Extensions directory on this website a while ago.
Re: PDF Icon
Posted: Wed Sep 05, 2007 5:06 am
by doctorD
I'll be dealing with this issue soon enough myself.
Check out
http://www.rustyparts.com/pdf.phpI'll be interested to see how you go.
Re: PDF Icon
Posted: Wed Sep 05, 2007 10:33 am
by donmarvin
That's not a Joomla component so you'd have to do a lot of coding to get it integrated with Joomla.
This one is already made for Joomla:
http://extensions.joomla.org/component/ ... Itemid,35/
Re: PDF Icon
Posted: Wed Sep 05, 2007 10:39 am
by doctorD
Not a 'lot' of coding, but some coding.
Given that this is the coding section, not the extensions section, I would think this is where people come to learn how to extend Joomla! by coding.
The version you have posted only works with J! 1 by the way, not 1.5!
Re: PDF Icon
Posted: Sat Oct 06, 2007 11:50 pm
by deepthoughts
I just tried the PDF function in Joomla 1.5 to see if I remembered correctly and yes I did. The PDF function in J!1.5 doesn't display just text, it displays images too.
Re: PDF Icon
Posted: Tue Oct 09, 2007 3:36 am
by xKillswitchx
Since you are asking, I don't think you know how to modify the core yourself to get the result?
I just did a quick sniff around the files, and it appears that the controls are located in includes/pdf.php in the 1.0 version. It appears that a function is cleaning all tags from the content ( function pdfCleaner() I think ). The comment says that it is cleaned because the pdf class can't handle it ( class.pdf.php and class.ezpdf.php in includes folder ). It however isn't stripping the img tag directly, just things like {mosimage},
,
and so on. They do however use strip_tags on the content. Maybe passing img as an allowable tag would allow images to be shown in your PDF files? That is all I see in pdf.php that would remove images from your PDF.
Anyone up for the task of helping get a free PDF enhancement up here? Nothing to the extent of Pretty PDF, but a basic patch or upgrade? I am willing to donate some time to it, am going to test and see if images show after passing img as allowable tag.
UPDATE - I added as an allowable tag, but all it did in the PDF was show the . My guess is that another function is cleaning the content keeping it safe for output. That, and Ive never worked with PDF generation before, so maybe there is another way to do this? If so, simple replacement should work, will try it out. If it works, I will post an updated pdf.php.
UPDATE 2 - There is a special way to get images into the PDF, and I am working on it now.