PDF Icon

Have a programming question regarding your component, plug-in, extension or core hacks? Have an interesting tidbit, FAQ or programming tip you’d like to share? This is the place for you.

Moderators: tjay, seadap, Rogue4ngel, matthewhayashida

Post Reply
MCCIT
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu Aug 09, 2007 9:20 am

PDF Icon

Post by MCCIT » Tue Sep 04, 2007 2:38 pm

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

donmarvin

Re: PDF Icon

Post by donmarvin » Tue Sep 04, 2007 2:43 pm

You need to get a commercial product for this, like Pretty PDF.

MCCIT
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu Aug 09, 2007 9:20 am

Re: PDF Icon

Post by MCCIT » Tue Sep 04, 2007 3:23 pm

Thanks very much - I shall investigate that one!

Dave

MCCIT
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu Aug 09, 2007 9:20 am

Re: PDF Icon

Post by MCCIT » Tue Sep 04, 2007 3:24 pm

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

donmarvin

Re: PDF Icon

Post by donmarvin » Tue Sep 04, 2007 3:39 pm

I had seen it in the Extensions directory on this website a while ago.

doctorD
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sat Sep 01, 2007 8:31 pm

Re: PDF Icon

Post by doctorD » Wed Sep 05, 2007 5:06 am

I'll be dealing with this issue soon enough myself.

Check out http://www.rustyparts.com/pdf.php

I'll be interested to see how you go.

donmarvin

Re: PDF Icon

Post by donmarvin » Wed Sep 05, 2007 10:33 am

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/

doctorD
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sat Sep 01, 2007 8:31 pm

Re: PDF Icon

Post by doctorD » Wed Sep 05, 2007 10:39 am

donmarvin wrote: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/


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!

User avatar
deepthoughts
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Tue Sep 27, 2005 1:12 pm
Location: The northern part of Sweden (Piteå)

Re: PDF Icon

Post by deepthoughts » Sat Oct 06, 2007 11:50 pm

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.
Stefan Nitsche
stefan_at_nitsche_dot_se

xKillswitchx
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sun Mar 26, 2006 7:55 pm

Re: PDF Icon

Post by xKillswitchx » Tue Oct 09, 2007 3:36 am

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?  :D  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 whatever.  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.
  • Last edited by xKillswitchx on Tue Oct 09, 2007 3:54 am, edited 1 time in total.


    Post Reply