a few words about web development

How to convert PDF to HTML or TXT?

Extracting text from PDF in a few lines of code
In this example we're gonna use REST7 to convert our PDF document to HTML format:

<?php
$url = 'http://your_server.com/document.pdf';
$data = json_decode(file_get_contents('http://api.rest7.com/v1/pdf_to_html.php?url=' . $url));

if (@$data->success !== 1)
{
    die('Failed');
}
$doc = file_get_contents($data->file);
file_put_contents('rendered_html.htm', $doc);

Converting PDF to TXT is very similar:
<?php
$url = 'http://your_server.com/document.pdf';
$data = json_decode(file_get_contents('http://api.rest7.com/v1/pdf_to_text.php?layout=0&url=' . $url));

if (@$data->success !== 1)
{
    die('Failed');
}
$doc = file_get_contents($data->file);
file_put_contents('converted.txt', $doc);

Comments

Beberthttp://api.rest7.com/v1/pdf_info.php?url=http://www.africau.edu/images/default/sample.pdf&api_key=a8d380174e3338915cb2bbf290ef7511eaf1ae09 can u help me ?
bebertalways answer :{"success":0,"error":"R7ERR_UPLOAD_FAILED"} (key is created with an uned email so you can use it)