TCPDF ERROR?

Phoca PDF - creating PDF documents in Joomla! CMS
detlilto2
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 29 Dec 2010, 12:06

TCPDF ERROR?

Post by detlilto2 »

Hi,
I have problem with generating pdf in virtuemart order list.

It looks like:

Warning: strpos() [function.strpos]: Empty delimiter in /administrator/components/com_phocapdf/assets/tcpdf/tcpdf.php on line 20249

Warning: Cannot modify header information - headers already sent by (output started at /administrator/components/com_phocapdf/assets/tcpdf/tcpdf.php:20249) in /administrator/components/com_phocapdf/assets/tcpdf/tcpdf.php on line 7930
TCPDF ERROR: Some data has already been output to browser, can't send PDF file


What is wrong?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: TCPDF ERROR?

Post by Jan »

Hi, try to check all the outupt, try to empty header, footer, etc. to try find, which part can be in problem. For example, the editor produces a html code which cannot be worked in tcpdf, etc. :idea:

Jan
If you find Phoca extensions useful, please support the project
detlilto2
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 29 Dec 2010, 12:06

Re: TCPDF ERROR?

Post by detlilto2 »

Hi,
do you mean header and footer in index.php? I don't see any problem in this section. I change the default editor in joomla and nothing.
In Phoca PDF Plugins (virtuemart) I changed PDF Destination on Inline Browser (Popup) and now I see that:


"
Warning: strpos() [function.strpos]: Empty delimiter in /administrator/components/com_phocapdf/assets/tcpdf/tcpdf.php on line 20249
%PDF-1.7 8 0 obj << /Type /Page /Parent 1 0 R /LastModified (D:20110104105942+01'00') /Resources 2 0 R /MediaBox [0.00 0.00 595.28 841.89] /CropBox [0.00 0.00 595.28 841.89] /BleedBox [0.00 0.00 595.28 841.89] /TrimBox [0.00 0.00 595.28 841.89] /ArtBox [0.00 0.00 595.28 841.89] /Contents 9 0 R /Rotate 0 /Group << /Type /Group /S /Transparency /CS /DeviceRGB >> /Annots [ 6 0 R 7 0 R ] /PZ 1 >> endobj 9 0 obj <> stream x��]�r�6���)p�άa�H2W]��I�D�v�tv[v���D��M�f�q_`��ȔDR<���#J�H���qR@d��q�_�������^��������`�2xp��;A�pC��C $�9O.w8�J�!�3E�.���_�kL���SA$� %����%K���P*�"Ed]�S�[���D����.�� !���`F���`5WGD� V �̘6X�(�|��SG��,B0�h.qL�Z#��WHU��������C�P��\�Ҏ�Jb7�@��9���?�/��U������Z��f�������G����3|86���%K ��}]`z�a=��PDQ����j.*���_ٻU�-�-%���|)��[��� ��XȬ,�H���ct��Dc4Bghh���B�Kt Vm��饰�� ���ɞ�xF�P�ǩs3Wa�o-R����� 0�XL�Y�� 7�<Ġ��bӘp�0�cO;�Et��p���eQ���AY��0�|_!�b<�o- ��U�eqgWA�Z�6QAXG��u'�C��9�FYfHe�?���<-C9F|�rm��;Yn5\څP��5J� ����&���q^�.��jgӵKg��J�*Mǁ���8�3-m��J2�d�|��ڔe &)]CS���W>&�M˳0�#�B�gg��ν9��%Щa�ݒez4�sf(�]��P�裾�h�

..."
detlilto2
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 29 Dec 2010, 12:06

Re: TCPDF ERROR?

Post by detlilto2 »

You mean header and footer in plugin - I clean this and nothing changes... :(
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: TCPDF ERROR?

Post by Jan »

Hmmm, then no idea what causes this problem :idea:

Looking at the code seems like the problem is somewhere in the logo. Try to change the logo of VM, try to check if the folder and image can be accessed (the logo in VM)

If you are able to work with php, will be great, you will test the variable and constant here:

line cca 20249 in:
administrator\components\com_phocapdf\assets\tcpdf\tcpdf.php

FROM:

Code: Select all

$findroot = strpos($tag['attribute']['src'], JPATH_ROOT);
TO:

Code: Select all

print_r($tag['attribute']['src']);
print_r(JPATH_ROOT);
exit;
$findroot = strpos($tag['attribute']['src'], JPATH_ROOT);
If you find Phoca extensions useful, please support the project
detlilto2
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 29 Dec 2010, 12:06

Re: TCPDF ERROR?

Post by detlilto2 »

Hi,
my logo vm was deleted, but it isn't in this problem, restored logo nothing changed.
I did test about you write and now when I click on invoive in order list I see in popup this :

/components/com_virtuemart/shop_image/vendor/xxxxxxxxxx.png
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: TCPDF ERROR?

Post by Jan »

Hi, seems like you don't get the constant JPATH_ROOT ???

Try to add:
echo "Path Root: ". JPATH_ROOT.':';

instead of:
print_r(JPATH_ROOT);
If you find Phoca extensions useful, please support the project
detlilto2
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 29 Dec 2010, 12:06

Re: TCPDF ERROR?

Post by detlilto2 »

Now I see:

/components/com_virtuemart/shop_image/vendor/xxxxxxxxxxxxx.pngPath Root: :
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: TCPDF ERROR?

Post by Jan »

Hmmm, no idea but your sever does not produce any JPATH_ROOT ???

The JPATH ROOT should look like e.g. /home/www/your-joomla-site ???

Jan
If you find Phoca extensions useful, please support the project
Post Reply