Categories > TinyButStrong general >

Joomla pdf fix failing

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: andrew
Date: 2010-09-29
Time: 17:23

Joomla pdf fix failing

The following instructions on the joomla plugin documentation produce unexpected results:

Edit the PDF Generator script provided by Joomla in order to make it run all content plug-ins. To do so, just perform the following:
Edit the file <Joomla root folder>/components/com_content/views/article/view.pdf.php
And after the lines:
// process the new plugins
JPluginHelper::importPlugin('content', 'image');
$dispatcher->trigger('onPrepareContent', array (& $article, & $params, 0));
Add the two lines:
JPluginHelper::importPlugin('content');
$results = $dispatcher->trigger('onPrepareContent', array (& $article, & $params, 0));

The pdf window shows the following:

%PDF-1.5 3 0 obj <> endobj 4 0 obj <> stream x��YmO�H����F�������]��E\�^r���E& HH�QT��O�g�� I�k�!�/�:��<3;���\��M�ni�H��?\xW����cE�~ �����t(јXe���Lũ����+�.:b z�X��RH�I�r�-�b��.�Rl�>j�A�-.P����b��'뛐$�ⵌ�k��,kK:|XH�� he2y"��*���Dz&G�M���0>\�VY$S�(m�j�� �H�&4\A�O���� �Nqo����q� XEW�c=u� a���#�zls�!��8A�ڨ�@�19$�z`��`-�.��6�k�7X>�_�ܟ[ ��m- �5!y�.�!��s��a�b�j�p6�܄6<�� �n�1!�4�G��%�64镬L{x��q��! E�Ð��?W����W�Z�W,�GGL?=f���bV�f�1����QJ^,J�%M~0m�8�*��4;p!ZVM�a�=.���]B�6�W��ڑX9�n�/bK��z

This is just the start of a very long output bet you get the picture.

Can anyone help with sorting this out. I have no idea what is going wrong here and I followed the instructions for altering the file carefully?

The code in the joomla file now looks like this:

        // process the new plugins
        JPluginHelper::importPlugin('content', 'image');
        $dispatcher->trigger('onPrepareContent', array (& $article, & $params, 0));
        JPluginHelper::importPlugin('content');
        $results = $dispatcher->trigger('onPrepareContent', array (& $article, & $params, 0));
        $document = &JFactory::getDocument();
       
By: Skrol29
Date: 2010-09-29
Time: 23:24

Re: Joomla pdf fix failing

What is your Joomla version?
By: andrew
Date: 2010-09-30
Time: 09:13

Re: Joomla pdf fix failing

I am working on version 1.5.20
By: Skrol29
Date: 2010-09-30
Time: 10:18

Re: Joomla pdf fix failing

hi Andrew,

I cannot reproduce your bug. I've tested Joomla 1.5.20 with TBS plugin version 1.2.3, on PHP 5.3 and the PDF is output normally.
Can you check that you have the latest TBS plugin version 1.2.3 ?
By: andrew
Date: 2010-09-30
Time: 15:05

Re: Joomla pdf fix failing

Hi,

The TBS plugin is version 1.2.3, PHP 5.3 working on a local apache server on windows 7.

Any ideas what I need to check?
By: Skrol29
Date: 2010-09-30
Time: 15:15

Re: Joomla pdf fix failing


Check if the Joomla article is displayed without error in HTML mode. Check the source of the HTML, there should be no PHP error message at the top.


Try to download another PDF from your browser, can you get it and see it normally in your PDF read software ?
For instance, try with: www.education.gov.yk.ca/pdf/pdf-test.pdf

What exactly happens when you click on the PDF icon of the article? Do you have directly the binary contents displayed in the browser, or do you have a dialogbox before?