The error message shown in the title is shown when hitting the Demo site for this module
http://pdf.use-cases.customweb.ch/invoice/pdf/1

It is the same error that I receive whenever attempting to view an Ubercart Invoice. TCPDF and FPDI are installed in the correct locations ("sites/all/libraries/") and I can view the 'Example' PDF document as stated at http://www.tcpdf.org/installation.php
(i.e. http://www.yoursite.com/tcpdf/example/example_001.php)

I'm hoping that whoever maintains the demo site might know what has occurred and possibly point me in the direction of a fix. Any advice welcome.

Comments

hunziker’s picture

The issue is new. I think it is introduced in the beta2. I will check this.

hunziker’s picture

I found the problem. Some additional content is printed out after the PDF binary content is delivered. In combination with the views_append module, this leads to this strange error.

The latest commit contains the fix. I will publish the next beta version in some days. Use instead the dev version, which is released tomorrow. (The build will be done tonight.)

hunziker’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

drecute’s picture

Issue tags: +Views PDF

I guess I need to re-open this.

In my case, I'm simply trying to generate a PDF using the supplied views_pdf rule in combination with uc_rules which is triggered whenever an order status changes to "payment_received". Whenever this rule is triggered I get a blank screen with the message an described the op.

views_pdf (version 6.x-1.0)
uc_rules (6.x-1.0)
drupal 6.22

Thanks

drecute’s picture

I checked the diff in the commit history on this file views_pdf_template.php as seen in the repo at http://drupalcode.org/project/views_pdf.git/blobdiff/88de1de0ec227c8b8f9.... I guess there's a match with 6.x-1.0 branch. Probably that's not what the problem is @hunziker

drecute’s picture

OK! I had to change the URL for the append view in pdf_invoice to http://pdf.use-cases.customweb.ch/user/[order_id]/print_tickets. But then, I've been pondering why the URL has to be http://pdf.use-cases.customweb.ch/user/[order_id]/print_tickets. Isn't it possible to use a custom URL other than this?

jcallanan’s picture

I'm now seeing this error as well and don't seem to see the resolution posted anywhere.

http://www.errand-hopper.com/product/gift_certificate

TCPDF ERROR: Unable to find pointer to xref table

purencool’s picture

I am get some so thing like this

Ubercart - extra (title)
-Ubercart PDF Invoice 6.x-1.0-rc2

Printer, email and PDF versions (title)
-PDF version 6.x-1.18
-Printer-friendly pages 6.x-1.18
-Send by email 6.x-1.18

Under the users account there is a link to the invoice. Everytime I press on it
I get the following error.

php_network_getaddresses: getaddrinfo failed: Name or service not known (0)
TCPDF ERROR: Some data has already been output to browser, can't send PDF file

Sometimes when I refresh the page I get these warnings
warning: file_get_contents() [function.file-get-contents]: Couldn't resolve host name in /home/est/public_html/sites/all/modules/views_pdf/modules/views_append/views_append_handler_append_view.inc on line 65.
warning: file_get_contents(http://pdf.use-cases.customweb.ch/user/49/print_tickets) [function.file-get-contents]: failed to open stream: operation failed in /home/est/public_html/sites/all/modules/views_pdf/modules/views_append/views_append_handler_append_view.inc on line 65.
warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/est/public_html/sites/all/modules/views_pdf/modules/views_append/views_append.module on line 63.
warning: fsockopen() [function.fsockopen]: unable to connect to pdf.use-cases.customweb.ch:80 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in /home/est/0/public_html/sites/all/modules/views_pdf/modules/views_append/views_append.module on line 63.
warning: Cannot modify header information - headers already sent by (output started at /home/est/public_html/sites/all/modules/views_pdf/modules/views_append/views_append.module:66) in /home/est//public_html/sites/all/libraries/tcpdf/tcpdf.php on line 9043

jvieille’s picture

purencool , This is a different issue. I experiment the same problem
The solution is here
http://drupal.org/node/1485892

purencool’s picture

thanks