This is an archived forum post. The information may be outdated. Contact us if you have any questions.

Php is not working in convertURI() target page

seolawyers wrote on 2013-02-21:
I have plan to buy your monthly subscription for PDF generation in a report generation software.But i am in the problem due to php code. I have a php page where i change value dynamically and than generate PDF from that PHP page.But when i give this URL to you api its not working (it runs pefectly when i access this url from browswer).

Please help me.
support wrote on 2013-02-21:
Please let us know the following and we will look into it:

1. The page URL
2. Your PHP code where you call the API
3. Describe what exactly does not work
danish wrote on 2013-07-17:
support Wrote:
-------------------------------------------------------
> Please let us know the following and we will look
> into it:
>
> 1. The page URL
> 2. Your PHP code where you call the API
> 3. Describe what exactly does not work


I am having the same issue. I am using post data which is stored in a php array. I use array elements to display data in fields in my template. I've placed the script in the footer of the php file of which I want the pdf to be generated. I get the following error: arning: Cannot modify header information - headers already sent by (output started at /home/content/64/6914764/html/doa/genInvoice.php:99) in /home/content/64/6914764/html/doa/genInvoice.php on line 250

Warning: Cannot modify header information - headers already sent by (output started at /home/content/64/6914764/html/doa/genInvoice.php:99) in /home/content/64/6914764/html/doa/genInvoice.php on line 251

Warning: Cannot modify header information - headers already sent by (output started at /home/content/64/6914764/html/doa/genInvoice.php:99) in /home/content/64/6914764/html/doa/genInvoice.php on line 252

Warning: Cannot modify header information - headers already sent by (output started at /home/content/64/6914764/html/doa/genInvoice.php:99) in /home/content/64/6914764/html/doa/genInvoice.php on line 253
%PDF-1.5 %???? 1 0 obj<>stream x??W?n9 ????H??i??????????@? ?????H{??f?df4?CR?????_??T????????>???Q??d P@?:_XDw?m??????v????'G?a?!he\???Q??? )L??ZaA?'?'???H`?5D???/?\?|?l[??4?? ?e??qx?nG?bm???????w????????3??3S?????????c???l???O????A?~?C<???g???=?"R?c Z\?Y?f?????
support wrote on 2013-07-17:
Hello,

This error indicates that your PHP script already made an output (in genInvoice.php, line 99) before sending HTTP headers (genInvoice.php, lines 250, 251, 252 and 253).

More info on troubleshooting this error can found here: http://stackoverflow.com/a/8028987
danish wrote on 2013-07-17:
Thank you very much for your reply. I understand this error. Kindly assist me with the following:

I am posting an array and then using the array in a php array variable to display data on my page. now that page needs to be generated into a pdf by using your service.

I am placing your script in the footer of that page and using the convertURI() method to capture that page's contents for pdf generation.

How can I get the pdf of that page that includes the rendered php variables to html. after I post data to it. Can you please help. I am very frustrated in this. need to meet a critical deadline. Thanks
support wrote on 2013-07-18:
Hello,

If you can post here your current PHP code, we will take a look at it.