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

Dynmaic PHP Website to PDF

nipmuc wrote on 2012-02-22:
Hi pdfcrowd-team,

I have a problem using your free pdf conversion service.
I created a php-website, which content is loaded from a database depending on an entered primary key before. In case a primary key was entered which doesn't exist in the database a simple echo 'Key doesn't exist' is printed. If I enter a valid primar-key, the website is loaded with the correct content; nevertheless, when clicking the "convert-to-pdf-link" (http://pdfcrowd.com/url_to_pdf/?width=297mm&height=420mm) the pdf which returns only contains the mentioned error-message "Key doesn't exist".
I'm not sure, whether in general it's possible to convert such a php-website. So is there any chance to manage this or am I doing something wrong?

Thanks in advance and greetings from Munich!
support wrote on 2012-02-23:
Please, post a link to your web site and we will look into it.
nipmuc wrote on 2012-02-27:
I'm sorry, this is not possible because the data used is confident.
The website, which should be converted, gets the mentioned primary key as a $_POST[] variable from another website. I think the problem occurs because this variable is not available when the convert-to-pdf link is clicked. Due to this fact, when your conversion-service accesses the website, the necessary primary key misses and the error message is printed. Could this be the problem?
support wrote on 2012-02-29:
Our service always sends a GET request so the $_POST[] variable will be always empty.

A solution for your scenario could be:
- POST to your sever
- Generate HTML based on received POST variables
- Use our API and the convertHTML() method to print it to PDF.
nipmuc wrote on 2012-02-29:
Thanks for your solution. I managed it in another way as I just "send" the variable via a $_GET-Message to the page. This works without any problems.
selvabalaji wrote on 2012-03-05:
Hi Admin,

I have used the Highchart (Area & line, bar chart) in my project " report page" i can able to take the PDf of the individual chart, but i need to get all the content details from graph.
chk the attachment image
left i have diaplayed the total count detail and right side i have used the chart. when i create the pdf i need both content, could you please help me.
support wrote on 2012-03-05:
Hello,

I'm not sure I understand your requirements. Please post your HTML code you are trying to convert and we will look into it.
selvabalaji wrote on 2012-03-06:
Pls check it

i need to total conversation & other details in my pdf
selvabalaji wrote on 2012-03-06:
I need other text content and other images in my PDf
support wrote on 2012-03-07:
If I understand correctly you would like to convert multiple html documents into a single pdf. Our service does not support this directly, but you have these two options:

1/ You can assemble a single html document from multiple html documents and then print it to pdf.
2/ Convert each html document to pdf and then merge the pdfs on your end (e.g. using pdftk)