Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Parameters
- $token = '123yourtokenabc'; // Replace this with your API token
- $url = 'https://wemakepdf.com/html/invoice.html'; // Full URL starting with http
- // Convert the HTML string to a PDF using those parameters
- $result = file_get_contents('https://wemakepdf.com/api/v1/convert?token=' . $token . '&url=' . urlencode($url));
- // Save to root folder in website/application
- file_put_contents('example.pdf', $result);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement