PDF creating in Joomla! 1.6

146 views
Skip to first unread message

Jan (Phoca)

unread,
Mar 11, 2009, 8:09:40 AM3/11/09
to Joomla! Framework Development
Hi, I have read the article about tasks for Joomla! 1.6. For me this
event is interesting:

- Examine the PDF generation system in detail and see if we can make
it work properly (otherwise we will look at dropping it if we can't
make it work well).

My ideas about PDF in Joomla! 1.6:

1) I think, there should be new class JPDF in Joomla! libraries. This
class should extend the TCPDF class (in core TCPDF class there
shouldn't be any changes so it can be actualized easy). So JPDF class
will contain above all the Header() and Footer() method which will
override the basic TCPDF methods. This methods can get parameter
values, so user will be able to customize the PDF.

There are two possible ways of getting and saving parameter values:

a) Parameters will be a part of e.g. com_pdf component in Joomla! (in
case there will be com_pdf component which will care about PDF
creating of articles)
b) or Parameters will be a part of e.g. plg_content_pdf, some plugin
which will care about PDF creating of articles in Joomla! If there
will be a system of plugins, then other PDF plugins for other Joomla!
components can be installed.

The JPDF class should contain method which recognize the user's
browser. In case user will use IE7, there will be implemented hack for
opening the PDF document in popup window in IE7 (which now don't work
if this hack is not implemented). This method exists and is described
on some of the Joomla! website.

If a) or b), this depends on possibilities of the Joomla! system.

2) Fonts. There should be a way how to install PDF fonts. If you use
the freesans font, then your PDF document will have e.g. 300 kb but if
you will use some core font and you will not bind the font into the
PDF document, your created PDF document will have e.g. 18 kb !!! This
can be important for users who know then they will only create PDF
with characters they are included in core fonts. So it should depend
on users which font they will install. The freesans should stay here
as default font.

The system of installing fonts can be following:

a) This can be a part of e.g. com_pdf component but
b) it can work as Plugin Manager, Module Manager, Language Manger too.
In Joomla! system, there can be a Font Manager. For now we can use
this manager for installing PDF fonts. But in the future we can use
this Font Manger for installing CSS fonts. Under CSS fonts I mean Font-
face in CSS (.otf for standard browsers, .eot for Microsoft browsers).
So it means in the future there can be two groups of fonts: PDF fonts,
CSS fonts

If you want to see, how this feature can work, just install Phoca PDF
under your 1.5. You can see the installing of the PDF fonts (not so
pure as it will be under Font Manager and as it will have own database
table: jos_fonts). You can see possible parameters which can be used
for creating PDF by users.

If this feature is interesting for you and there is a developer who
cares about PDF in Joomla! please let me know. I am ready to help
while creating this feature.

Thank you, Jan

Mr Mediart

unread,
Mar 15, 2009, 8:29:00 PM3/15/09
to Joomla! Framework Development
Hi all. I am quite new to this group so please excuse me if I am not
farmiliar with protocol.

I would like to address the issue of the PDF Class. Is there any scope
for considering a different PDF generater base. I have used FPDF for a
project recently and found it to be very versatile. The system we
built was standard PHP but had very powerful functions behind it for
creating PDF. It creates full print ready artwork for Real Estate
Signage for a Signwriter. We were in direct communication with
Valentin who is the developer of FPDF. He acually upgraded 2 versions
because of our need for better AI import functions. You can find an
example of the PDF output (low res) here:
http://www.mediart.com.au/images/stories/pdfcreator/examples/rw-6x4-sample.pdf

Just let me know if anyone thinks this might be worth looking into
further.


Brenden Worley
Mediart Solutions
www.mediart.com.au

infograf768

unread,
Mar 16, 2009, 3:34:43 AM3/16/09
to Joomla! Framework Development
As far as I know FPDF is not utf8 savvy, which is the reason why TCPDF
was used in the first place.
See http://www.fpdf.org/
"7. Accented characters are replaced by some strange characters like
é.
Don't use UTF-8 encoding. Standard FPDF fonts use ISO-8859-1 or
Windows-1252. It is possible to perform a conversion to ISO-8859-1
with utf8_decode(): "

On 16 Mar, 01:29, Mr Mediart <bwor...@mediart.com.au> wrote:
> Hi all. I am quite new to this group so please excuse me if I am not
> farmiliar with protocol.
>
> I would like to address the issue of the PDF Class. Is there any scope
> for considering a different PDF generater base. I have used FPDF for a
> project recently and found it to be very versatile. The system we
> built was standard PHP but had very powerful functions behind it for
> creating PDF. It creates full print ready artwork for Real Estate
> Signage for a Signwriter. We were in direct communication with
> Valentin who is the developer of FPDF. He acually upgraded 2 versions
> because of our need for better AI import functions. You can find an
> example of the PDF output (low res) here:http://www.mediart.com.au/images/stories/pdfcreator/examples/rw-6x4-s...
Reply all
Reply to author
Forward
0 new messages