Page 1 of 1

TCPDF ERROR?

Posted: 29 Dec 2010, 12:22
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?

Re: TCPDF ERROR?

Posted: 01 Jan 2011, 00:13
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

Re: TCPDF ERROR?

Posted: 04 Jan 2011, 12:11
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�

..."

Re: TCPDF ERROR?

Posted: 05 Jan 2011, 00:57
by detlilto2
You mean header and footer in plugin - I clean this and nothing changes... :(

Re: TCPDF ERROR?

Posted: 05 Jan 2011, 16:29
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);

Re: TCPDF ERROR?

Posted: 12 Jan 2011, 00:25
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

Re: TCPDF ERROR?

Posted: 12 Jan 2011, 01:05
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);

Re: TCPDF ERROR?

Posted: 12 Jan 2011, 03:18
by detlilto2
Now I see:

/components/com_virtuemart/shop_image/vendor/xxxxxxxxxxxxx.pngPath Root: :

Re: TCPDF ERROR?

Posted: 16 Jan 2011, 14:44
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